2016

Table Of Contents
duplicate picture box 2 to after picture box 4
tell picture box 5
set bounds to {"20.471 cm", "2 cm", "21.971 cm", "3.5 cm"}
end tell
end tell
CONCEPTS
The
duplicate
and
set
events above are similar to using the Step and
Repeat feature.
The first
duplicate
event references the second picture box by index [2].
A copy of the picture box is placed after the second picture box.
The first
set
statement sets numerical values for the picture box boundaries.
The four parameters indicate how far from the top-left corner of the layout
page the top, left, bottom, and right sides of the box will be positioned.
The following lines use the object hierarchy to duplicate picture box 2 after
picture box 3, then after picture box 4. Each new picture box is referenced by
index and positioned.
Create the third picture box and import a picture
tell page 1 of layout space 1 of project 1
make picture box at end with properties
{bounds:{"6.875 cm", "18.425 cm", "12.729 cm", "26.4 cm"},
color:"None"}
tell picture box 6
try
set image 1 to alias (thepath & "Helmet.TIFF")
on error
set image 1 to (choose le with prompt "Please select the le
\'Helmet.TIFF\'." of type {"TIFF"})
end try
tell image 1
set scale to {70, 70}
set offset to {"0.557 cm", "1.254 cm"}
end tell
end tell
end tell
SCRIPT WRITING SAMPLE
A GUIDE TO APPLE EVENTS SCRIPTING
|
29