AppleScript Suite : Standard terms for AppleScript activate : Bring the targeted application program to the front

activate

log : Cause a comment to be logged
log string

stop log : Stop event logging in the script editor
stop log

start log : Start event logging in the script editor
start log

idle : Sent to a script application when it is idle
idle Result : integer -- the number of seconds to wait for next idle event

launch : Start an application for scripting
launch

tell : Record or log a ‘tell’ statement
tell

end tell : Record or log an ‘end tell’ statement
end tell

error : Raise an error
error [ anything] [number small integer] -- an error number [partial result list] -- any partial result occurring before the error [from anything] -- the object that caused the error [to anything] -- the desired class for a failed coercion

Call•subroutine : A subroutine call
Call•subroutine [ anything] [at anything] -- a preposition [from anything] -- a preposition [for anything] -- a preposition [to anything] -- a preposition [thru anything] -- a preposition

1

[through anything] -- a preposition [by anything] -- a preposition [on anything] -- a preposition [into anything] -- a preposition [onto anything] -- a preposition [between anything] -- a preposition [against anything] -- a preposition [out of anything] -- a preposition [instead of anything] -- a preposition [aside from anything] -- a preposition [around anything] -- a preposition [beside anything] -- a preposition [beneath anything] -- a preposition [under anything] -- a preposition [over anything] -- a preposition [above anything] -- a preposition [below anything] -- a preposition [apart from anything] -- a preposition [about anything] -- a preposition [since anything] -- a preposition [given anything] -- parameter:value pairs, comma-separated [with type class] -- formal parameter set to true if matching actual parameter is provided [without type class] -- formal parameter set to false if matching actual parmeter is provided Result : anything

= : Equality
= reference Result : anything

≠ : Inequality
≠ reference Result : anything

+ : Addition
+ reference Result : anything

- : Subtraction
- reference Result : anything

2

* : Multiplication
* reference Result : anything

÷ : Division
÷ reference Result : anything

div : Quotient
div reference Result : anything

mod : Remainder
mod reference Result : anything

^ : Exponentiation
^ reference Result : anything

> : Greater than
> reference Result : anything

≥ : Greater than or equal to
≥ reference Result : anything

< : Less than
< reference Result : anything

≤ : Less than or equal to
≤ reference Result : anything

& : Concatenation
& reference Result : anything

3

starts with : Starts with
starts with reference Result : anything

ends with : Ends with
ends with reference Result : anything

contains : Containment
contains reference Result : anything

and : Logical conjunction
and reference Result : anything

or : Logical disjunction
or reference Result : anything

as : Coercion
as reference Result : anything

not : Logical negation
not reference Result : anything

negate : Numeric negation
negate reference Result : anything

Class boolean : A true or false value
Plural form: booleans

Class integer : An integral number
Plural form: integers

Class real : A real number

4

Plural form: reals

Class number : an integer or real number
Plural form: numbers

Class list : An ordered collection of items
Plural form: lists Properties: length integer [r/o] -- the length of a list reverse list [r/o] -- the items of the list in reverse order rest list [r/o] -- all items of the list excluding first

Class linked list : An ordered collection of items
Plural form: linked lists Properties: length integer [r/o] -- the length of a list

Class vector : An ordered collection of items
Plural form: vectors Properties: length integer [r/o] -- the length of a list

Class record : A set of labeled items
Plural form: records

Class item : An item of any type
Plural form: items Properties: id integer -- the unique ID number of this object

Class script : An AppleScript script
Plural form: scripts Properties:

5

name string [r/o] -- the name of the script parent script [r/o] -- its parent, i.e. the script that will handle events that this script doesn’t

Class list or record : a list or record Class list or string : a list or string Class number or string : a number or string Class alias or string : an alias or string Class list, record or text : a list, record or text Class number or date : a number or date Class number, date or text : a number, date or text Class class : (inherits from type class) the type of a value
Plural form: classes

Class event : an AppleEvents event
Plural form: events

Class property : an AppleEvents property
Plural form: properties

Class constant : A constant value
Plural form: constants

Class preposition : an AppleEvents preposition
Plural form: prepositions

Class reference form : an AppleEvents key form
Plural form:

6

reference forms

Class handler : an AppleScript event or subroutine handler
Plural form: handlers

Class data : an AppleScript raw data object Class text : text with language and style information Class international text : text that begins with a writing code
Plural form: international text

Class string : text in 8-bit Macintosh Roman format
Plural form: strings

Class styled text : text with font, size, and style information
Plural form: styled text

Class styled Clipboard text : clipboard text with font, size, and style information
Plural form: styled Clipboard text

Class Unicode text : text in the Unicode format (cannot be viewed without
conversion) Plural form: Unicode text

Class styled Unicode text : styled text in the Unicode format
Plural form: styled Unicode text

Class encoded string : text encoded using the Text Encoding Converter
Plural form: encoded strings

Class C string : text followed by a null
Plural form:

7

C strings

Class Pascal string : text up to 255 characters preceded by a length byte
Plural form: Pascal strings

Class character : an individual text character
Plural form: characters

Class text item : text between delimiters
Plural form: text items

Class writing code : codes that identify the language and script system Class writing code info : script code and language code of text run
Plural form: writing code infos Properties: script code small integer [r/o] -- the script code for the text language code small integer [r/o] -- the language code for the text

Class : the undefined value Class missing value : unavailable value, such as properties missing from
heterogeneous classes in a Whose clause Plural form: missing values

Class reference : an AppleScript reference
Plural form: references

Class anything : any class or reference Class type class : the name of a particular class (or any four-character code) Class RGB color : Three integers specifying red, green, blue color values
Plural form: RGB colors

8

Class picture : A QuickDraw picture object
Plural form: pictures

Class sound : a sound object on the clipboard
Plural form: sounds

Class version : a version value Class file specification : a file specification as used by the operating system
Plural form: file specifications Properties: POSIX path string [r/o] -- the POSIX path of the file

Class alias : a file on a disk or server. The file must exist when you check the syntax
of your script. Plural form: aliases Properties: POSIX path string [r/o] -- the POSIX path of the file

Class machine : a computer
Plural form: machines

Class zone : an AppleTalk zone
Plural form: zones

Class keystroke : a press of a key combination on a Macintosh keyboard
Plural form: keystrokes Properties: key character -- the character for the key was pressed (ignoring modifiers) modifiers a list of option down/command down/control down/shift down/caps lock down -- the modifier keys pressed in combination key kind escape key/delete key/tab key/return key/clear key/enter key/up arrow key/down arrow key/left arrow key/right arrow key/help key/home key/page

9

up key/page down key/forward del key/end key/F1 key/F2 key/F3 key/F4 key/F5 key/F6 key/F7 key/F8 key/F9 key/F10 key/F11 key/F12 key/F13 key/F14 key/F15 key -- the kind of key that was pressed

Class seconds : more than one second Class date : Absolute date and time values
Plural form: dates Properties: weekday weekday [r/o] -- the day of a week of a date month month [r/o] -- the month of a date day integer [r/o] -- the day of the month of a date year integer [r/o] -- the year of a date time integer [r/o] -- the time since midnight of a date date string string [r/o] -- the date portion of a date-time value as text time string string [r/o] -- the time portion of a date-time value as text

Class month : a month
Plural form: months

Class January : the month of January Class February : the month of February Class March : the month of March Class April : the month of April Class May : the month of May Class June : the month of June Class July : the month of July Class August : the month of August Class September : the month of September

10

Class October : the month of October Class November : the month of November Class December : the month of December Class weekday : a weekday
Plural form: weekdays

Class Sunday : Sunday Class Monday : Monday Class Tuesday : Tuesday Class Wednesday : Wednesday Class Thursday : Thursday Class Friday : Friday Class Saturday : Saturday Class metres : a distance measurement in SI meters Class metres : a distance measurement in SI meters Class inches : a distance measurement in Imperial inches Class feet : a distance measurement in Imperial feet Class yards : a distance measurement in Imperial yards Class miles : a distance measurement in Imperial miles Class kilometres : a distance measurement in SI kilometers Class kilometres : a distance measurement in SI kilometers

11

Class centimetres : a distance measurement in SI centimeters Class centimetres : a distance measurement in SI centimeters Class square metres : an area measurement in SI square meters Class square metres : an area measurement in SI square meters Class square feet : an area measurement in Imperial square feet Class square yards : an area measurement in Imperial square yards Class square miles : an area measurement in Imperial square miles Class square kilometres : an area measurement in SI square kilometers Class square kilometres : an area measurement in SI square kilometers Class litres : a volume measurement in SI liters Class litres : a volume measurement in SI liters Class gallons : a volume measurement in Imperial gallons Class quarts : a volume measurement in Imperial quarts Class cubic metres : a volume measurement in SI cubic meters Class cubic metres : a volume measurement in SI cubic meters Class cubic centimetres : a volume measurement in SI cubic centimeters Class cubic centimetres : a volume measurement in SI cubic centimeters Class cubic feet : a volume measurement in Imperial cubic feet Class cubic inches : a volume measurement in Imperial cubic inches Class cubic yards : a distance measurement in Imperial cubic yards

12

Class kilograms : a mass measurement in SI kilograms Class grams : a mass measurement in SI meters Class ounces : a weight measurement in SI meters Class pounds : a weight measurement in SI meters Class degrees Celsius : a temperature measurement in SI degrees Celsius Class degrees Fahrenheit : a temperature measurement in degrees Fahrenheit Class degrees Kelvin : a temperature measurement in degrees Kelvin Class upper case : Text with lower case converted to upper case Class app : Short name for application
Plural form: applications

Class app : specifies global properties of AppleScript
Plural form: applications Properties: result anything [r/o] -- the last result of evaluation space character [r/o] -- a space character return character [r/o] -- a return character tab character [r/o] -- a tab character minutes integer [r/o] -- the number of seconds in a minute hours integer [r/o] -- the number of seconds in an hour days integer [r/o] -- the number of seconds in a day weeks integer [r/o] -- the number of seconds in a week pi real [r/o] -- the constant pi print length integer [r/o] -- the maximum length to print print depth integer [r/o] -- the maximum depth to print text item delimiters list [r/o] -- the text item delimiters of a string AppleScript script [r/o] -- the top-level script object

Required Suite : Every application supports open, print, run, and quit

13

Standard Suite : Common terms for most applications open : Open the specified object(s)
open reference -- list of objects to open

run : Run an application. Most applications will open an empty, untitled window.
run -- no direct parameter required

reopen : Reactivate a running application. Some applications will open a new
untitled window if no window is open. reopen -- no direct parameter required

print : Print the specified object(s)
print reference -- list of objects to print

quit : Quit an application
quit [saving yes/no/ask] -- specifies whether to save currently open documents

close : Close an object
close reference -- the object to close [saving yes/no/ask] -- specifies whether changes should be saved before closing [saving in file] -- the file or alias in which to save the object

count : Return the number of elements of an object
count reference -- the object whose elements are to be counted [each type class] -- if specified, restricts counting to objects of this class Result : integer -- the number of elements

delete : Delete an object from its container. Note this does not work on script
variables, only on elements of application classes. delete reference -- the element to delete

duplicate : Duplicate one or more objects
duplicate reference -- the object(s) to duplicate [to location reference] -- the new location for the object(s) [with properties record] -- the initial values for properties of the new

14

object that are to be different from the original Result : reference -- to the duplicated object(s)

exists : Verify if an object exists
exists reference -- the object in question Result : boolean -- true if it exists, false if not

make : Make a new element
make new type class -- the class of the new element [at location reference] -- the location at which to insert the element [with data anything] -- the initial data for the element [with properties record] -- the initial values for the properties of the element Result : reference -- to the new object(s)

move : Move object(s) to a new location
move reference -- the object(s) to move to location reference -- the new location for the object(s) Result : reference -- to the object(s) after they have been moved

save : Save an object
save reference -- the object to save, usually a document or window [in file] -- the file or alias in which to save the object [as type class] -- the file type of the document in which to save the data

select : Make a selection
select reference -- the object to select

data size : (optional) Return the size in bytes of an object
data size reference -- the object whose data size is to be returned [as type class] -- the data type for which the size is calculated Result : integer -- the size of the object in bytes

suite info : (optional) Get information about event suite(s)
suite info type class -- the suite for which to return information [in «class intl»] -- the human language and script system in which to return information Result : a list of type suite info -- a record containing the suites and their versions

15

event info : (optional) Get information about the Apple events in a suite
event info type class -- the event class of the Apple events for which to return information [in «class intl»] -- the human language and script system in which to return information Result : a list of type event info -- a record containing the events and their parameters

class info : (optional) Get information about an object class
class info [ type class] -- the object class about which information is requested [in «class intl»] -- the human language and script system in which to return information Result : type class info -- a record containing the object’s properties and elements

Class app : An application program
Plural form: applications Properties: name international text [r/o] -- the name of the application frontmost boolean [r/o] -- Is this the frontmost application? selection selection-object -- the selection visible to the user. Use the ‘select’ command to set a new selection; use ‘contents of selection’ to get or change information in the document. clipboard a list of anything -- the contents of the clipboard for this application version version [r/o] -- the version of the application

Class document : A document of a scriptable application
Plural form: documents Properties: modified boolean [r/o] -- Has the document been modified since the last save?

Class file : a file on a disk or server
Plural form: files Properties: POSIX path string [r/o] -- the POSIX path of the file

Class alias : a file on a disk or server. The file must exist when you check the syntax
of your script.

16

Plural form: aliases Properties: POSIX path string [r/o] -- the POSIX path of the file

Class selection-object : A way to refer to the state of the current of the
selection. Use the ‘select’ command to make a new selection. Properties: contents anything -- the information currently selected. Use ‘contents of selection’ to get or change information in a document.

Class window : A window
Plural form: windows Properties: bounds bounding rectangle -- the boundary rectangle for the window closeable boolean [r/o] -- Does the window have a close box? titled boolean [r/o] -- Does the window have a title bar? index integer -- the number of the window floating boolean [r/o] -- Does the window float? modal boolean [r/o] -- Is the window modal? resizable boolean [r/o] -- Is the window resizable? zoomable boolean [r/o] -- Is the window zoomable? zoomed boolean -- Is the window zoomed? visible boolean -- Is the window visible?

Class insertion point : An insertion location between two objects
Plural form: insertion points

Text Suite : A set of basic classes for text processing Class character : (inherits from text) A character
Plural form: characters

Class line : (inherits from text) A line of text
Plural form: lines Properties:

17

justification left/right/center/full -- the justification of the text

Class paragraph : (inherits from text) A paragraph
Plural form: paragraphs

Class text : Text
Properties: type class [r/o] color RGB color -- the color of the first character font text -- the name of the font of the first character size fixed -- the size in points of the first character writing code «class intl» [r/o] -- the script system and language style text style info -- the text style of the first character of the first character uniform styles text style info -- the text styles that are uniform throughout the text quoted form text [r/o] -- the text in quoted form Elements: character by numeric index line by numeric index paragraph by numeric index text by numeric index word by numeric index

Class text flow : (inherits from text) A contiguous block of text. Page layout
applications call this a ‘story.’ Plural form: text flows Properties: name international text -- the name

Class text style info : On and Off styles of text run
Plural form: text style infos Properties: on styles a list of styled Clipboard text [r/o] -- the styles that are on for the text off styles a list of styled Clipboard text [r/o] -- the styles that are off for the text

Class word : (inherits from text) A word

18

Plural form: words

QuickDraw Graphics Suite : A set of basic classes for graphics Class arc : An arc
Plural form: arcs Properties: arc angle fixed -- the angle of the arc in degrees bounds bounding rectangle -- the smallest rectangle that contains the entire arc definition rect bounding rectangle -- the rectangle that contains the circle or oval used to define the arc fill color RGB color -- the fill color fill pattern pixel map -- the fill pattern pen color RGB color -- the pen color pen pattern pixel map -- the pen pattern pen width small integer -- the pen width start angle fixed -- the angle that defines the start of the arc, in degrees transfer mode copy pixels/not copy pixels/or pixels/not or pixels/bic pixels/not bic pixels/xor pixels/not xor pixels/add over pixels/add pin pixels/sub over pixels/sub pin pixels/ad max pixels/ad min pixels/blend pixels -- the transfer mode

Class drawing area : Container for graphics and supporting information
Plural form: drawing areas Properties: background color RGB color -- the color used to fill in unoccupied areas background pattern pixel map -- the pattern used to fill in unoccupied areas color table color table -- the color table ordering a list of reference -- the ordered list of graphic objects in the drawing area name international text -- the name default location point -- the default location of each new graphic object pixel depth small integer -- the number of bits per pixel writing code «class intl» [r/o] -- the script system and language of text objects in the drawing area text color RGB color -- the default color for text objects default font international text -- the name of the default font for text objects default size fixed -- the default size for text objects style text style info -- the default text style for text objects

19

update on change boolean -- Redraw after each change?

Class graphic line : A graphic line
Plural form: graphic lines Properties: start point point -- the starting point of the line end point point -- the ending point of the line dash style a list of dash style -- the dash style arrow style no arrow/arrow at start/arrow at end/arrow at both ends -- the arrow style

Class graphic object : A graphic object
Plural form: graphic objects

Class graphic shape : A graphic shape
Plural form: graphic shapes

Class graphic text : A series of characters within a drawing area
Properties: color RGB color -- the color of the first character font text -- the name of the font of the first character size fixed -- the size in points of the first character uniform styles text style info -- the text styles that are uniform throughout the text

Class graphic group : Group of graphics
Plural form: graphic groups

Class oval : An oval
Plural form: ovals

Class pixel : A pixel
Plural form: pixels Properties: color RGB color -- the color

20

Class pixel map : A pixel map
Plural form: pixel maps

Class polygon : A polygon
Plural form: polygons Properties: point list a list of point -- the list of points that define the polygon

Class rectangle : A rectangle
Plural form: rectangles

Class rounded rectangle : A rounded rectangle
Plural form: rounded rectangles Properties: corner curve height small integer -- the height of the oval used to define the shape of the rounded corners corner curve width small integer -- the width of the oval used to define the shape of the rounded corners

QuickDraw Graphics Supplemental Suite : Defines transformations of graphic
objects

Class drawing area : Container for graphics and supporting information
Plural form: drawing areas Properties: rotation rotation -- the default rotation for objects in the drawing area scale fixed -- the default scaling for objects in the drawing area translation point -- the default repositioning for objects in the drawing area

Class graphic group : Group of graphics
Plural form: graphic groups

21

Table Suite : Classes for manipulating tables Class cell : A cell
Plural form: cells Properties: formula text -- the formula of the cell protection read only/formulas protected/read/write -- Indicates whether value or formula in the cell can be changed

Class column : A column
Plural form: columns Properties: name international text -- the name of the column

Class row : A row
Plural form: rows

Class table : A table
Plural form: tables

Macintosh Connectivity Classes : Classes relating to Apple Macintosh personal
computer connectivity

Class device specification : A device connected to a computer
Plural form: device specifications Properties: properties record -- property that allows getting and setting of multiple properties device type hard disk drive/floppy disk drive/CD ROM drive/DVD drive/storage device/keyboard/mouse/trackball/trackpad/pointing device/video monitor/LCD display/display/modem/PC card/PCI card/NuBus card/printer/speakers/microphone [r/o] -- the kind of device device address address specification [r/o] -- the address of the device

Class address specification : Unique designation of a device or service

22

connected to this computer Plural form: address specifications Properties: properties record -- property that allows getting and setting of multiple properties conduit ADB/printer port/modem port/modem printer port/LocalTalk/ Ethernet/Token Ring/SCSI/USB/FireWire/infrared/PC card/PCI bus/NuBus/PDS slot/ Comm slot/monitor out/video out/video in/audio out/audio line in/audio line out/ microphone -- How the addressee is physically connected protocol serial/AppleTalk/IP/SCSI/ADB/FireWire/IrDA/IRTalk/USB/PC card/PCI bus/NuBus/bus/Macintosh video/SVGA/S video/analog audio/digital audio/PostScript -- How to talk to this addressee

Class ADB address : (inherits from address specification) Addresses a device
connected via Apple Desktop Bus Plural form: ADB addresses Properties: ID small integer -- the Apple Desktop Bus device ID

Class AppleTalk address : (inherits from address specification) Addresses a
device or service connected via the AppleTalk protocol Plural form: AppleTalk addresses Properties: AppleTalk machine string -- the machine name part of the address AppleTalk zone string -- the zone part of the address AppleTalk type string -- the type part of the AppleTalk address

Class bus slot : (inherits from address specification) Addresses a PC, PCI, or NuBus
card Plural form: bus slots Properties: ID small integer -- the slot number

Class Ethernet address : (inherits from address specification) Addresses a
device by its Ethernet address Plural form: Ethernet addresses Properties:

23

ID integer -- the Ethernet address

Class FireWire address : (inherits from address specification) Addresses a device
on the FireWire bus Plural form: FireWire addresses Properties: ID small integer -- the FireWire device ID

Class IP address : (inherits from address specification) Addresses a device or
service via the Internet Protocol (IP) Plural form: IP addresses Properties: ID string -- the address in the form "127.201.0.1" DNS form string -- the address in the form "apple.com" port string -- the port number of the service or client being addressed

Class LocalTalk address : (inherits from address specification) Addresses a
device by its LocalTalk address Plural form: LocalTalk addresses Properties: network small integer -- the LocalTalk network number node small integer -- the LocalTalk node number socket small integer -- the LocalTalk socket number

Class SCSI address : (inherits from address specification) Addresses a SCSI device
Plural form: SCSI addresses Properties: SCSI bus small integer -- the SCSI bus number ID small integer -- the SCSI ID LUN small integer -- the SCSI logical unit number

Class Token Ring address : (inherits from address specification) Addresses a
device or service via the Token Ring protocol Plural form: Token Ring addresses Properties: ID small integer -- the Token Ring ID

24

Class USB address : (inherits from address specification) Addresses a device on
the Universal Serial Bus Plural form: USB Addresses Properties: name string -- the USB device name

25

Sign up to vote on this title
UsefulNot useful