2017

Table Of Contents
return
end try
end tell
ABOUT THE SCRIPT BREAKDOWN
This section first discusses how to direct a script to QuarkXPress. The script is
then divided into the steps a user would perform when constructing a layout.
The steps include creating a new layout, creating a text box, importing text, for-
matting the text, and so on. The script syntax is then displayed in the Courier
font. Following the syntax is a concept line that translates the scripting language
into actions in QuarkXPress. The events, objects, and properties set in the script
are then analyzed line by line. The script breakdown follows this format:
A STEP IN THE LAYOUT CONSTRUCTION PROCESS
code
CONCEPTS
The code above is described in terms of actions in QuarkXPress.
Each event, object, or property is discussed line by line.
BREAKDOWN OF THE LAYOUT CONSTRUCTION SCRIPT
LOCATE THE TERMINOLOGY FOR QUARKXPRESS OBJECTS
AND EVENTS
tell application "QuarkXPress"
CONCEPTS
This statement specifies the location of QuarkXPress terminology.
Use the
tell
statement to identify which object is being addressed. Using this
statement is necessary because certain actions and properties only apply to
specific objects.
In the remainder of this section, the previous format will be used to reference
the location of items in AppleScript. The following formats will be used to
reference the location of items:
tell layout space 1 o f project 1 of
application "QuarkXPress"
.
DECLARE THE VARIABLES CONCEPTS
This statement declares local variables for the script.
Although it is not essential to declare local variables, it makes scripts much safer.
Making variables local ensures that QuarkXPress table entries will not be altered
inadvertently if they have the same name as a variable used in a script.
Declaring local variables is not required in AppleScript.
SCRIPT WRITING SAMPLE
18
|
A GUIDE TO APPLE EVENTS SCRIPTING