Article View: adobe.scripting.indesign
Article #18981[AS] - Justification and Language
From: Fernando G. Jensen
Date: Tue, 11 Feb 2003 14:25
Date: Tue, 11 Feb 2003 14:25
60 lines
3199 bytes
3199 bytes
I have two scripts, which will be compiled as one when finished. They are used on Quark docs converted to InDesign.
The first script should set text justification (found in the paragraph palette) back to standard. (The imported Quark doc has some unwanted settings).
My first try:
tell application "InDesign 2.0.2"
set myDocument to active document
tell myDocument
set myTextObjects to {insertion point, character, word, line, text style range, paragraph, text column, text, story}
set mySelection to selection
set myParaStyle to paragraph
set myParaStyle to make justification of paragraph with properties {minimum word spacing:80}
set myParaStyle to make paragraph style with properties {desired word spacing:100}
set myParaStyle to make paragraph style with properties {maximum word spacing:133}
set myParaStyle to make paragraph style with properties {minimum letter spacing:0}
set myParaStyle to make paragraph style with properties {desired letter spacing:0}
set myParaStyle to make paragraph style with properties {maximum letter spacing:0}
set myParaStyle to make paragraph style with properties {minimum glyph scaling:100}
set myParaStyle to make paragraph style with properties {desired glyph scaling:100}
set myParaStyle to make paragraph style with properties {maximum glyph scaling:100}
set myParaStyle to make paragraph style with properties {auto leading:120}
set myParaStyle to make paragraph style with properties {single word justification:fully justified}
end tell
end tell
and my second try:
tell application "InDesign 2.0.2"
set myDocument to active document
tell myDocument
set myParagraph to paragraph
tell myParagraph
set minimum word spacing to 80
set desired word spacing to 100
set maximum word spacing to 133
set minimum letter spacing to 0
set desired letter spacing to 0
set maximum letter spacing to 0
set minimum glyph scaling to 100
set desired glyph scaling to 100
set maximum glyph scaling to 100
set auto leading to 120
set single word justification to fully justified
end tell
end tell
end tell
The next script should chance the language of the selected items from English: USA to Danish.
tell application "InDesign 2.0.2"
set myTextObjects to {insertion point, character, word, line, paragraph, text column, text, story}
set mySelection to selection
set name of language to "Danish"
end tell
Does anyone have an idea... or solution?
Thank you
Fernando
Technical Details
Message-ID:
<1de7cd2c.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,c595c017e74e9d48,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-11 06:39:24 PST From: "Fernando G. Jensen" <fgj@eniro.dk> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: [AS] - Justification and Language Message-ID: <1de7cd2c.-1@WebX.la2eafNXanI> Date: Tue, 11 Feb 2003 06:25:49 -0800 Lines: 77 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit