2017

Table Of Contents
FORMAT
Each event is listed with a description of its usage, a prototype in AppleScript,
and any applicable possible values and results. The terms and events are shown
in the following format:
TERM OR EVENT
Usage: description of when to use this term or event.
AppleScript prototype parameters in italics
Possible values:
variable
options
Result: result (for example, integer, text string, and so on)
OBJECT REFERENCE FORMS
To communicate, an Apple event message must reference a specific object in
an application. The reference first identifies the container enclosing the object
you’re specifying. It then uses a reference form to separate a specific object
from all possible objects in the container. The reference form can be defined
by index, ID, name, range, relative position, or test.
INDEX
Usage: to identify ordered elements in a container with an integer number.
set the kern of character 1 of word 2 to -14
ID
Usage: to identify objects that have a unique ID.
set color of text box id 7 to "Red"
NAME
Usage: to identify named objects with a text string.
set runaround of picture box "Pear" to manual runaround
RANGE
Usage: to identify a range of objects.
set color of words 2 through 5 to "Cyan"
RELATIVE POSITION
Usage: to identify objects that are before or after other objects.
set the rotation of the picture box after picture box 2 to 45
TEST
Usage: to identify objects that meet certain conditions.
set the color of (every word whose color = "Red") to "Blue"
SCRIPT WRITING SAMPLE
A GUIDE TO APPLE EVENTS SCRIPTING
|
33