2016

Table Of Contents
SET THE VIEW SCALE
tell layout space 1
set view scale to fit page in window
end tell
CONCEPTS
The lines above are similar to choosing Fit in Window from the View
menu for the active layout.
The
tell
statement references the left-most layout space.
The
set
event changes the view scale property to the data
fit page in window
.
The view scale property can be a percentage or specific view. For example, to
specify 100% view, use
100
for the second parameter. To specify thumbnails,
use
thumbnails
for the second parameter.
CREATE GUIDES
tell page 1 of layout space 1 of project 1
make horizontal guide at beginning with properties
{position:"4.218 cm"}
make horizontal guide at end with properties {position:"8.447 cm"}
make horizontal guide at end with properties {position:"27.152 cm"}
make vertical guide at end with properties {position:"2 cm"}
make vertical guide at end with properties {position:"4.962 cm"}
make vertical guide at end with properties {position:"18.742 cm"}
make vertical guide at end with properties {position:"32 cm"}
end tell
CONCEPTS
The
make
events above simulate clicking the horizontal and vertical rulers to
create guides, and then dragging the guides into position.
The
tell
statement references the layout by index [1]. The index value [1]
refers to the left-most layout space.
Each
make
event makes a horizontal guide or vertical guide. The guides are
created with the properties specified in the properties record.
The first guide is created at the beginning of page 1 in the object hierarchy
according to the fourth parameter. Subsequent guides are created at the end
of page 1.
SCRIPT WRITING SAMPLE
A GUIDE TO APPLE EVENTS SCRIPTING
|
21