Language Guide
CHAPTER 4
Commands
Using Command Definitions 77
Using Command Definitions 4
Command definitions contain information about what commands do and how
to use them in scripts. Figure 4-1 shows the definition for the Move command,
an application command. The definition contains four types of information:
syntax, parameters, results, and examples. Some definitions include information
about errors as well. The sections following the figure explain the information
conveyed by each part of the definition.
Figure 4-1 Command definition for the Move command
PARAMETERS
application command
RESULT
A reference to the object that was moved.
Class: Reference
EXAMPLE
tell document 1 of app "Scriptable Text Editor"
move word 10 to before paragraph 11
end tell
SYNTAX
A Move command is a request to move an object or objects.
Move
move referenceToObject to referenceToLocation
referenceToObject
referenceToLocation
A reference to the object or objects to move.
Class: Reference
A reference to the location to which to move the object
or objects.
Class: Reference