Language Guide
CHAPTER 4
Commands
80 Using Parameters
the Cancel button in the dialog box, AppleScript returns error number –128
and the error string "User canceled". Your script must handle this error
for script execution to continue.
For a complete description of handling errors that occur during script
execution, see Chapter 8, “Handlers.”
Using Parameters 4
This section describes how to
■ use parameters that specify locations
■ coerce parameters
■ deal with raw data in parameters
Parameters That Specify Locations 4
Many commands have parameters that specify locations. A location can be
either an insertion point or another object. An insertion point is a location
where an object can be added. An object, when used as a location parameter,
is an object to be replaced by another object.
For example, in the following statement, the to parameter specifies the location
to which to move the first word. The value of the to parameter is the reference
before paragraph 10, which is an insertion point.
move word 1 to before paragraph 10
In the following statement, the value of the to parameter is an object,
word 10. The Move command replaces word 10 with word 1.
tell front window of application "Scriptable Text Editor"
move word 1 to word 10
end tell