Command Definitions
The sections that follow are in alphabetical order by command name and provide definitions for both AppleScript commands and standard application commands. The general features of these types of commands are described in "Types of Commands,"which begins on page 71. The command type is listed opposite the command name on the first line of each definition.For definitions of commands provided by the scripting additions that come with AppleScript English, see the AppleScript Scripting Additions Guide. For definitions of commands provided by other scripting additions, see the documentation for those scripting additions.
The application commands defined in this chapter are standard application commands supported by most applications. The definitions in this chapter describe how these commands work in most applications. Individual applications can extend or change the way the standard application commands work.
Application dictionaries list application commands under two categories, the Required suite and the Standard suite. All applications support the commands in the Required suite. Different applications may support different commands in the Standard suite. Table 4-1 summarizes the standard application commands described in this chapter that belong to each suite.
Many applications also define their own suite of more specialized commands. The application's dictionary provides definitions of all commands supported by the application. Check the appropriate application dictionary before using application commands. You can open an application's dictionary by selecting the application's icon on the desktop, dragging it over the Script Editor's icon, and releasing the mouse button.
Standard application commands defined in this chapter Command Summary Required suite Open Opens a file. Prints one or more objects. Quit Terminates an application. Run Launches an application and invokes its standard startup procedures. Standard suite Close Closes one or more objects. Copy Copies an object or objects to the Clipboard or to a
new location.Count Counts elements of a particular class in an object. Data Size Returns the size, in bytes, of the value of an object. Delete Deletes one or more objects. Duplicate Copies an object or objects to a new location. Exists Determines if an object exists. Get Returns the value of an object. Launch[1] Launches an application without invoking its standard
startup procedures.Make Creates a new object. Move Moves an object or objects. Save Saves an object to a file. Set Assigns a value to an object. Table 4-2 lists the AppleScript commands defined in this chapter.
Another AppleScript command, the Error command, is described in "Try Statements," which begins on page 204.
[1] Although the target of a Launch command is always an application, it is actually handled by AppleScript. Unlike the other commands listed in this table, the Launch command doesn't need to be explicitly supported by applications and doesn't appear in any application's dictionary.