Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 4 - Commands / Using Command Definitions


Parameters are values that are included with a command. The "Parameters" section of a command definition lists the parameters of a particular command and the information you need to use them correctly.

Many commands include a direct parameter that specifies the object of the action. If a command includes parameters other than the direct parameter, they are identified by labels. Parameters that are identified by labels are called labeled parameters. The direct parameter immediately follows the command; labeled parameters can be listed in any order. The Move command defined
in Figure 4-1 has a direct parameter (referred to in the definition as referenceToObject) that specifies the object to move and a labeled parameter (whose label is to) that specifies where to move the object.

Each parameter value must belong to a particular class, which is listed in its description in the command definition. For the Move command, the direct parameter belongs to the class reference. Its value, a reference, is a phrase that identifies the object to be moved. The to parameter also belongs to the class reference. It specifies the location to which to move the object. References are described in Chapter 5, "Objects and References."

Parameters can be required or optional. Required parameters must be included with the command; optional parameters need not be. Optional parameters are enclosed in brackets in syntax descriptions. For optional parameters, the description in the "Parameters" section specifies a default value that is used if you don't include the parameter.

For more information about direct parameters, see "Application Commands" on page 72. For more information about using parameters, see "Using Parameters" on page 79.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996