Forum Replies Created
-
AuthorPosts
-
July 29, 2022 at 6:19 am in reply to: Looking for a way to batch change color space across multiple documents #14368649
Masood Ahmad
ParticipantYou can try this one liner to change the Transparency Blend mode to RGB
app.documents[0].transparencyPreferences.blendingSpace = BlendingSpace.RGB;save this code as a ‘[name].jsx’ JavaScript file and run it using the batch export utility on the folder containing your 40 files.
https://creativepro.com/files/kahrel/indesign/batch_convert.html
Hope this will help.
Masood Ahmad
ParticipantCheck this out…
March 21, 2022 at 2:19 pm in reply to: Will applying a dot gain twice double the amount of adjustment? #14361413Masood Ahmad
ParticipantHi Darrel,
I’m not sure, if converting to dotGain using Convert Colors is part of your process, but to my experience, it will definitely add a slight dot gain every time you convert your document. If you ask me, I would prefer to use the preflight fix –– “Convert color to B/W”. This preflight profile is purely based on 15% dotGain. Your gray tones will remains the same even after adding a color page to the pdf and re-preflighting it. Just give it a try.
Thanks,
MasoodMasood Ahmad
ParticipantA very warm welcome to the Forum, Mr. Mohammad Hassanain. Allow me some time to search for the working files and will test the script and let you know about it.
Thanks for writing your valuable time and support. I’ll get back to you soon.Masood Ahmad
ParticipantHi David, If you look at the Video, Mr. Lewis is already on an ME version of InDesign. You can see the direction icons on the Paragraph, Character, and Story Panels.
Hi Mordechai Lewis, If you click on the RTL icon on the Paragraph Panel, the text will start from Right and goes to the left. You can also switch the direction of the text-frame in the Story Panel by clicking on the bottom right icon, just below the ‘Optical Margin Alignment’ settings.
In addition, you can also change the character direction from the fly-out menu in the Character Panel.
Thanks,
MasoodPS: David, since you’re making changes to this site, I would request you to allow pasting of images in the posts. That will be a lot of help for everyone.
Masood Ahmad
ParticipantHi Kal,
A very big thank you for writing the code for me. It really worked great. I just tweaked the ignore4 to be false as the script is just designed to look for just currencies. I really loved it.
Secondly, I also like to thank you for briefing me about the quantifiers (). I do use them very often in my GREP codes. If I were to find numbers with comma, then your code
(\d+,?)+is the right choice. Since I need to capture the numbers, that’s why I have used \d\d\d, etc. As you said, only GREP won’t be enough, that’s why I was looking for something better. And I really got it. Thanks a lot again.Can you please share your email address with me at
masood.designs@gmail.comMasood Ahmad
ParticipantThanks, David, that was too quick. I already tried it, but the script won’t work if a number contain commas. So, I have to remove it first. Second, the sub-dropdown is disabled.
However, I tried to add some code to the script to remove the existing commas:
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = ',';
app.documents[0].selection[0].changeGrep();…and then I enabled the sub-dropdown list by commenting the line so that I can select:
//enabled = false;Now I can say the script is working fine. However, I think that the dialog box should not be there and I can figure out that the actual working code lies in this area. I tried to tweak it but didn’t get any success.
var D, E = "", G, X;
D = decimalDropdown.selection.index ? "," : ".";
G = delimiterDropdown.selection.index ? "\u2009" : ",";
D == "." && E = "";
X = "d+"+E+D+"{0,1}d+";
app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = X;
var myFinds = s.findGrep(), f, n, t, d;
while (f = myFinds.pop()){
n = f.contents.toString().split('.');
// Add commas to thousands
if (!ignore4.value || (n[0] && n[0].length > 4)){
t = n[0].split('').reverse().join('').match(/.{1,3}/g).join(G).split('').reverse().join('');
}
// Add commas to decimals if there are any.
if (!ignore4.value || (n[1] && n[1].length > 4)){
n[1] && (d = n[1].match(/.{1,3}/g).join(G), t += D + d);
}
t && f.contents = t;
}
}Apart from this, the code also converts any numbers be it phone numbers or a year. It will be good if the script can sense numbers that starts with a Dollar($) or Pound(£) or Euro(€) symbol.
Masood Ahmad
ParticipantWell…if you really want to remove the number and the Euro currency symbol altogether, then this would suffice.
GREP Find/Change:
Find What:\d[\d.,]*\x20€
Change to:Masood Ahmad
ParticipantJust one question: Is OPI still in use?
Masood Ahmad
ParticipantYou can also use the BatchScript to run another script on all the InDesign files within a folder.
Try that as well…
Masood Ahmad
ParticipantThanks Jeremy. It worked as you said.
I didn’t realised that earlier.
Thanks a lot.
PS: I’m unable to give time to this forum for a long time. Really sorry about that. I’ll be back once things settled down.
-
AuthorPosts
