2016

Table Of Contents
DONT
tell page 1 of layout space 1 of project 1
tell picture box 1
set rotation to 90
set color to "Cyan"
set shade to 80
end tell
end tell
COMPILE SCRIPTS
Using the
do
script event sends a compiled script directly to QuarkXPress
where it is pro cessed completely within the application before anything
appears on-screen.
Add the following lines to AppleScript scripts to have them automatically
compile and execute within QuarkXPress:
script theRealScript
tell application "QuarkXPress"
--the script goes here
end tell
end script
tell application "QuarkXPress"
do script {theRealScript}
end tell
SCRIPT WRITING SAMPLE
To illustrate how scripts interact with QuarkXPress objects, we have dissected
a script that uses a representative sample of the objects that QuarkXPress sup-
ports. The breakdown discusses creating objects, specifying initial properties,
and chang ing properties. In addition, the various aspects of the scripting
environment, including suites, events, the object model, the object hierarchy,
and object references, are discussed in the context of the objects in this script.
You can apply similar syntactical constructs to other objects in other scripts.
The sample script, Layout Construction,written in AppleScript, illustrates how
Apple events control objects within QuarkXPress. The script sets guides, makes
text and picture boxes, imports text and images, then specifies the properties
of these objects and their elements to produce a final layout.
SCRIPTING OVERVIEW
10
|
A GUIDE TO APPLE EVENTS SCRIPTING