Copy link to clipboard
Copied
Hi there,
I am trying to set a story's composer to Adobes single line composer via a script. The issue I have that I am running in a German locale and that I seem to be unable to use the English string to make the script work in all language environments.
myStory.composer = "Adobe Single-line Composer"; // -> throws an error
Anybody knows how to set it in a way that it recognizes the string in any environment?
Thank you!
Marc Autret (@indiscripts) kindly provided the answer over at Twitter:
myStory.composer = "$ID/HL Single";
Hi MasterDomino,
here all strings for composers that I am aware of for InDesign CS6 and above:
Paragraph composers:
$ID/HL Single
$ID/HL Composer
Adobe World-Ready Composers:
$ID/HL Single Optyca
$ID/HL Composer Optyca
Japanese Composers:
$ID/HL Single J
$ID/HL Composer J
How can you get the strings?
With a German InDesign you could ask with app.findKeyStrings() like that:
// Example: German InDesign
// Provided string is the German version of Adobe World-Ready Paragraph Composer
var myString = "Globale
...
Copy link to clipboard
Copied
Marc Autret (@indiscripts) kindly provided the answer over at Twitter:
myStory.composer = "$ID/HL Single";
Copy link to clipboard
Copied
Hi MasterDomino,
here all strings for composers that I am aware of for InDesign CS6 and above:
Paragraph composers:
$ID/HL Single
$ID/HL Composer
Adobe World-Ready Composers:
$ID/HL Single Optyca
$ID/HL Composer Optyca
Japanese Composers:
$ID/HL Single J
$ID/HL Composer J
How can you get the strings?
With a German InDesign you could ask with app.findKeyStrings() like that:
// Example: German InDesign
// Provided string is the German version of Adobe World-Ready Paragraph Composer
var myString = "Globaler Adobe-Absatzsetzer";
app.findKeyStrings(myString);
// Result is an array that contains
// "$ID/HL Composer Optyca"
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi @Laubender
I tried to change it to middle east version composer, its Adobe World-Ready Paragraph Composer but i cant identify the composer ID for the Middle East (ME Version), text string written in arabic :
var myString = "Ų£ŲÆŁŲØŁ Ų§ŁŲÆŁŲ²Ų§ŁŁ";
var myIDKey = app.findKeyStrings(myString);
$.writeln(myIDKey);
Copy link to clipboard
Copied
Hi @M.Hasanain ,
the two strings for the ME Adobe World-Ready Composers are:
$ID/HL Single Optyca
$ID/HL Composer Optyca
So this should work:
myStory.composer = $ID/HL Composer Optyca";
I cannot test with the ME version so I cannot answer your question about app.findKeyStrings().
Regards,
Uwe Laubender
( Adobe Community Professional )
Copy link to clipboard
Copied
Thank you very much @Laubender
Copy link to clipboard
Copied
Hi @M.Hasanain ,
one thing to note, though:
Recently I tried to change the composer by applying the string to the paragraph style itself through text.appliedParagraphStyle.composer = "Composer String". This surprisingly did not work. There was no error message, the applied paragraph style simply did not change.
What worked was to apply it to the text itself and then change the applied paragraph style accordingly through the GUI. I have to investigate this caseā¦
Test done with my German InDesign 2022 on Windows 10 where I wanted to change the composer to the Japanese Single Line Composer.
Regards,
Uwe Laubender
( Adobe Community Professional )