2016
Table Of Contents
- A Guide to Apple Events Scripting
- Introduction
- About this Guide
- Scripting Overview
- Script Writing Sample
- Definitions and Examples — Apple Events Terminology
- Definitions and Examples — Events Supported by QuarkXPress
- Data Coercion Chart
- Data Coercion Using the AppleScript Dictionary
- Reference Material for QuarkXPress Objects
- Application Events and Examples
- Application Elements and Reference Forms
- Application Properties, Data Types, and Descriptions
- Project Events and Examples
- Project Elements and Reference Forms
- Project Properties, Data Types, and Descriptions
- Layout Space Events and Examples
- Layout Space Elements and Reference Forms
- Layout Space Properties, Data Types, and Descriptions
- Window Events and Examples
- Window Elements and Reference Forms
- Window Properties, Data Types, and Descriptions
- Selection Object Properties, Data Types, and Descriptions
- Character Events and Examples
- Character Properties, Data Types, and Descriptions
- Line Events and Examples
- Line Elements and Reference Forms
- Line Properties, Data Types, and Descriptions
- Paragraph Events and Examples
- Paragraph Elements and Reference Forms
- Paragraph Properties, Data Types, and Descriptions
- Story Events and Examples
- Story Elements and Reference Forms
- Story Properties, Data Types, and Descriptions
- Text Events and Examples
- Text Elements and Reference Forms
- Text Properties, Data Types, and Descriptions
- Word Events and Examples
- Word Elements and Reference Forms
- Word Properties, Data Types, and Descriptions
- Open Type Style Record Properties, Data Types, and Descriptions
- Menu Events and Examples
- Menu Elements and Reference Forms
- Menu Properties, Data Types, and Descriptions
- Character Spec Events and Examples
- Character Spec Elements and Reference Forms
- Character Spec Properties, Data Types, and Descriptions
- Color Spec Events and Examples
- Color Spec Elements and Reference Forms
- Color Spec Properties, Data Types, and Descriptions
- Color System Events and Examples
- Color System Elements and Reference Forms
- Color System Properties, Data Types, and Descriptions
- Table Column Events and Examples
- Table Column Elements and Reference forms
- Table Column Properties, Data Types, and Descriptions
- Table Row Events and Examples
- Table Row Elements and Reference forms
- Table Row Properties, Data Types, and Descriptions
- Horizontal Gridline Events and Examples
- Horizontal Gridline Properties, Data Types, and Descriptions
- Vertical Gridline Events and Examples
- Vertical Gridline Properties, Data Types, and Descriptions
- Contour Events and Examples
- Contour Elements and Reference Forms
- Contour Properties, Data Types, and Descriptions
- Shape Path Events and Examples
- Shape Path Elements and Reference Forms
- Shape Path Properties, Data Types, and Descriptions
- Default Document Events and Examples
- Default Document Elements and Reference Forms
- Default Document Properties, Data Types, and Descriptions
- Delimit Item Events and Examples
- Delimit Item Elements and Reference Forms
- Delimit Item Properties, Data Types, and Descriptions
- Delimit Table Events and Examples
- Delimit Table Elements and Reference Forms
- Delimit Table Properties, Data Types, and Descriptions
- Fontset Spec Events and Examples (East Asian Only)
- Fontset Spec Elements and Reference Forms (East Asian Only)
- Fontset Spec Properties, Data Types, and Descriptions (East Asian only)
- Generic Box Events and Examples
- Generic Box Elements and Reference Forms
- Generic Box Properties, Data Types, and Descriptions
- Generic Cell Events and Examples
- Generic Cell Properties, Data Types, and Descriptions
- Graphic Box Events and Examples
- Graphic Box Elements and Reference Forms
- Graphic Box Properties, Data Types, and Descriptions
- Graphic Cell Events and Examples
- Graphic Cell Properties, Data Types, and Descriptions
- Group Box Events and Examples
- Group Box Elements and Reference Forms
- Group Box Properties, Data Types, and Descriptions
- H and J Spec Events and Examples
- H and J Spec Elements and Reference Forms
- H and J Spec Properties, Data Types, and Descriptions
- Image Events and Examples
- Image Elements and Reference Forms
- Image Properties, Data Types, and Descriptions
- Layer Events and Examples
- Layer Elements and Reference Forms
- Layer Properties, Data Types, and Descriptions
- Line box Events and Examples
- Line box Elements and Reference Forms
- Line box Properties, Data Types, and Descriptions
- Master Layout space Events and Examples
- Master Layout space Elements and Reference Forms
- Master Layout space Properties, Data Types, and Descriptions
- Page Events and Examples
- Page Elements and Reference Forms
- Page Properties, Data Types, and Descriptions
- Clipping Path Events and Examples
- Clipping Path Elements and Reference Forms
- Clipping Path Properties, Data Types, and Descriptions
- Picture Box Events and Examples
- Picture Box Elements and Reference Forms
- Picture Box Properties, Data Types, and Descriptions
- Picture Cell Events and Examples
- Picture Cell Elements and Reference Forms
- Picture Cell Properties, Data Types, and Descriptions
- Spread Events and Examples
- Spread Elements and Reference Forms
- Spread Properties, Data Types, and Descriptions
- Style Spec Events and Examples
- Style Spec Elements and Reference Forms
- Style Spec Properties, Data Types, and Descriptions
- Table Box Events and Examples
- Table Box Elements and Reference forms
- Table Box Properties, Data Types, and Descriptions
- Text Box Events and Examples
- Text box Elements and Reference Forms
- Text box Properties, Data Types, and Descriptions
- Text Cell Events and Examples
- Text Cell Elements and Reference Forms
- Text Cell Properties, Data Types, and Descriptions
- Text Style Range Events and Examples
- Text Style Range Elements and Reference Forms
- Text Style Range Properties, Data Types, and Descriptions
- Vertex Events and Examples
- Vertex Elements and Reference Forms
- Vertex Properties, Data Types, and Descriptions
- Vertical Guide Events and Examples
- Vertical Guide Elements and Reference Forms
- Vertical Guide Properties, Data Types, and Descriptions
- Xtension Events and Examples
- Xtension Elements and Reference Forms
- Xtension Properties, Data Types, and Descriptions
- Custom Bleeds Setup Properties, Data Types, and Descriptions (Requires Custom Bleeds QuarkXTensions Software)
- Blend Record Events and Examples
- Blend Record Elements and Reference Forms
- Blend Record Properties, Data Types, and Descriptions
- Fixed Point Properties, Data Types, and Descriptions
- Fixed Rectangle Properties, Data Types, and Descriptions
- Font Record Properties, Data Types, and Descriptions
- Frame Record Properties, Data Types, and Descriptions
- Justification Record Properties, Data Types, and Descriptions
- OPI Setup Record Properties, Data Types, and Descriptions(Requires OPI QuarkXTensions software)
- OPI Setup object
- Print Setup record Properties, Data Types, and Descriptions
- Rule Record Properties, Data Types, and Descriptions
- Tab Record Properties, Data Types, and Descriptions
- Glossary
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 file with prompt "Please select the file
\'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