2016

Table Of Contents
PROCESS IN QUARKXPRESS
Allow QuarkXPress to do calculations using its own built-in functions, and
minimize context switches between QuarkXPress and the scripting application.
For example, to set the color of all generic boxes to red:
DO
set the color of every generic box to "Red"
DONT
set numberOfBoxes to count of generic boxes
repeat with i from 1 to numberOfBoxes
set color of generic box i to "Red"
end repeat
To change the color of all green generic boxes to red:
DO
set color of every generic box whose color equals "Green" to "Red"
DONT
set numberOfBoxes to count of generic boxes
repeat with i from 1 to numberOfBoxes
if name of color of generic box i equals "Green" then set color of
generic box i to "Red"
end repeat
SPECIFY INITIAL PROPERTIES WHEN PERFORMING A MAKE EVENT
Use the
make
event to specify initial properties rather than using subsequent
set
events. You can also set multiple properties. In AppleScript, you specify the
initial properties within the make statement.
DO
make picture box at beginning of last page with properties
{rotation:90,color:"Cyan",shade:80}
Set multiple properties:
DO
tell layout space 1 of project 1
set properties of picture box 1 to
{rotation:90,color:"Cyan",shade:80}
end tell
SCRIPTING OVERVIEW
A GUIDE TO APPLE EVENTS SCRIPTING
|
9