Copy link to clipboard
Copied
I wanna to use script to set this, but I can't find what methods to use. Anyone should help me, please?
Copy link to clipboard
Copied
Hi
it is possible to set 'composer' property with a String value
in Japanese version, following code works,
please try in your language.
thank you
var doc = app.documents.add();
var pstyle = doc.paragraphStyles.add();
$.writeln(pstyle.composer); // => Adobe 日本語段落コンポーザー
pstyle.composer = "Adobe 日本語単数行コンポーザー";
$.writeln(pstyle.composer); // => Adobe 日本語単数行コンポーザー
Copy link to clipboard
Copied
thanks, milligramme, it works.
Copy link to clipboard
Copied
good!
please check as Correct Answer to close this thread.
thank you
Copy link to clipboard
Copied
@Milligramme – there are also locale-independent strings for both Japanese composers:
"$ID/HL Single J"
"$ID/HL Composer J"
Did a test in InDesign CC v9.3.0 (German) and applied the "Adobe Japanese Single-line Composer" to a paragraphStyle by scripting.
myParagraphStyle.composer = "$ID/HL Single J";
This is not possible working in the UI only.
Don't know, if I ever would need something like that, but I think it's worth mentioning.
Uwe
Copy link to clipboard
Copied
@Laubender
nice! I could get those CONST? by this script
var key_string = app.findKeyStrings("Adobe 日本語単数行コンポーザー");
$.writeln(key_string); // => $ID/HL Single J
and in the same way
CS5 doesn't has "Adobe World-Ready Single-line Composer" yet.
// "Adobe World-Ready Single-line Composer"
// app.findKeyStrings("Adobe 多言語対応単数行コンポーザー")
pstyle.composer = "$ID/HL Single Optyca";
I could add "Adobe World-Ready Single-line Composer" to the paragraph style, but I don't know it works or not.
thank you