Constructing A Document - Adobe 65024872 - InDesign CS4 - Mac Manual

Scripting guide
Hide thumbs Also See for 65024872 - InDesign CS4 - Mac:
Table of Contents

Advertisement

Adobe InDesign CS4 Scripting Tutorial

Constructing a document

Obviously, our "Hello World!" script would not be very useful in your daily work, but it's shown you the
basics of InDesign scripting. In the following section, we'll show a script that does a bit more, and
demonstrates scripting techniques you're likely to use in your own scripts.
While you can use an InDesign script at any point in your production process, we will start by creating a
script that start at the same point you do: we'll create a new document, set page margins, and define and
apply master pages. The following figure shows a block diagram that represents the objects we'll be
working with.
document
In this section, we will look the DocumentTemplate tutorial script. We'll break the script up into a series of
blocks; each block demonstrates a specific area or task in InDesign scripting.
N
: The figure above uses the JavaScript version of the scripting terms. For AppleScript, you would add
OTE
spaces between words (
item index starting at 1, rather than 0 (
Apart from these very minor differences in spacing and capitalization, and for a few reserved words in each
language, the terms used in the different languages are the same.
The objects in the object model generally correspond to the names of controls in the user interface, as
shown in the following diagram (which, again, uses the JavaScript form of the scripting terms):
viewPreferences
horizontalMeasurementUnits
verticalMeasurementUnits
rulerOrigin
masterSpreads.item(0)
pages.item(0)
view preferences
masterSpreads.item(1)
marginPreferences
columnCount
columnGutter
, rather than
viewPreferences
, rather than
Constructing a document 29
top
left
bottom
right
); for VBScript, you would use an
masterSpreads.item(0)
).

Advertisement

Table of Contents
loading

This manual is also suitable for:

Indesign cs4

Table of Contents