Language Guide

CHAPTER 4
Commands
Types of Commands 73
Similarly, if you specify a reference incompletely in the command line,
AppleScript uses the default target specified in the enclosing Tell statement
to complete the reference. For example, the following statement is equivalent
to both of the previous examples:
tell front document of app "Scriptable Text Editor"
delete word 1
end tell
For information about sending application commands to script objects, see
Chapter 9, “Script Objects,” which begins on page 265.
AppleScript Commands 4
AppleScript commands are commands that are built into the AppleScript
language. They act on values in scripts. The target of an AppleScript command
is a value in the current script, which is usually specified in the direct
parameter of the command.
There are only five AppleScript commands: Copy, Count, Get, Run, and Set. All
of these commands can also function as application commands. For the Count,
Get, Run, and Set commands, if the direct parameter is a value, then the
command functions as an AppleScript command. If the direct parameter is an
application object, the command functions as an application command.
For example, this Count command functions as an AppleScript command
because the direct parameter is a value (a list):
count {"How", "many", "items", "in", "this", "list"}
This Count command functions as an application command because the direct
parameter is an application object:
count words in paragraph 1 of front document of
application "Scriptable Text Editor"
For the Copy command, if the value of the to parameter is a reference to an
application object, then the command functions as an application command.
Otherwise, the command is an AppleScript command.