Adobe InDesign CS5 Scripting Tutorial
Adobe InDesign CS5 Scripting Tutorial
Adobe InDesign CS5 Scripting Tutorial
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Adobe</strong> <strong>InDesign</strong> <strong>CS5</strong> <strong>Scripting</strong> <strong>Tutorial</strong> Constructing a document 33<br />
AppleScript<br />
set myGridPreferences to grid preferences<br />
set baseline division of myGridPreferences to 14<br />
set baseline start of myGridPreferences to 70<br />
set baseline grid shown of myGridPreferences to true<br />
JavaScript<br />
var myGridPreferences = myDocument.gridPreferences;<br />
myGridPreferences.baselineDivision = 14;<br />
myGridPreferences.baselineStart = 70;<br />
myGridPreferences.baselineGridShown = true;<br />
VBScript<br />
Set myGridPreferences = myDocument.GridPreferences<br />
myGridPreferences.BaselineDivision = 14<br />
myGridPreferences.BaselineStart = 70<br />
myGridPreferences.BaselineGridShown = True<br />
Adding master page items<br />
Next, we add two text frames to the master pages. These frames will contain the auto-page-number<br />
special character and will be positioned at the bottom of the page.<br />
In the “Hello World” example, we created a text frame and specified its position and size using the<br />
geometric bounds property—an array containing the top, left, bottom, and right coordinates for the<br />
frame. The coordinates correspond to the corners of the frame, just as they would appear in the Control<br />
panel. The geometric bounds are: top = 728, left = 70, bottom = 742, and right = 528, as shown in the<br />
following two figures: