Adobe 27510753 Scripting Guide - Page 97
Setting text-formatting defaults, Setting application text defaults
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 97 highlights
Adobe InDesign CS2 Scripting Guide Working with Documents in AppleScript 89 Setting text-formatting defaults You can set the default text-formatting attributes for your application or for individual documents. If you set the text-formatting defaults for the application, they become the defaults for all new documents-existing documents remain unchanged. When you set the text-formatting defaults for a document, any new text that you put into the document uses those defaults, and any existing text remains unchanged. Setting application text defaults To set the text-formatting defaults for your application: --ApplicationTextDefaults.as --An InDesign CS2 AppleScript --Sets the application text defaults, which will become the text defaults for all --new documents. Existing documents will remain unchanged. Note that all of --these properties could be set using a single "with properties" statement--we've --split them into separate statements here for the sake of clarity. tell application "Adobe InDesign CS2" set myBlackSwatch to color "Black" set myNoneSwatch to swatch "None" tell text defaults set align to baseline to true try set applied font to font "Minion Pro" end try try set font style to "Regular" end try try set applied language to "English: USA" end try set auto leading to 100 set balance ragged lines to false set baseline shift to 0 set capitalization to normal set composer to "Adobe Paragraph Composer" set desired glyph scaling to 100 set desired letter spacing to 0 set desired word spacing to 100 set drop cap characters to 0 if drop cap characters is not equal to 0 then set drop cap lines to 3 --Assumes that the application has a default character style --named "myDropCap" set drop cap style to character style "myDropCap" end if set fill color to myBlackSwatch set fill tint to 100 set first line indent to "14pt" set gradient fill angle to 0 set gradient fill length to 0 set grid align first line only to false set horizontal scale to 100 set hyphenation to true set hyphenate after first to 3 set hyphenate before last to 4 set hyphenate capitalized words to false set hyphenate ladder limit to 1 set hyphenate words longer than to 5 set hyphenation zone to "3p" set hyphen weight to 9 set justification to left align set keep all lines together to false set keep lines together to true