Language Guide
CHAPTER 4
Commands
88 Command Definitions
EXAMPLES
tell application "Scriptable Text Editor"
close window "Tremendous" saving Yes
end tell
tell application "Scriptable Text Editor"
close saving in file "Macintosh HD:Documents:Report"
end tell
NOTES
To specify the name (nameString) of a file in which to save the object, use a
string of the form "Disk:Folder1:Folder2:...:Filename"; for details, see
“References to Files,” which begins on page 144. You can also specify a string
with only a filename ("Filename"). In this case, the application attempts to find
the file in the current directory. If it can’t find the specified file, the application
creates a file with the specified name in the current directory.
Copy AppleScript command, application command4
The Copy command can function as an AppleScript command or an application
command. The AppleScript command makes a copy of one or more values and
stores it in one or more variables.
The application command is a request to copy an object or objects. If the
command includes a direct parameter, the Copy command makes a copy of one
or more objects specified in the direct parameter and puts them in one or more
new locations (if any are specified) or on the Clipboard (if no new location is
specified).
If the command does not include a direct parameter, the Copy command
makes a copy of the object or objects in the current selection and puts them
on the Clipboard. This is the same as choosing Copy from the Edit menu in
an application.
As shown in the syntax definitions that follow, put and into are synonyms for
copy and to. When you compile a script, put and into are automatically
changed to copy and to.