Language Guide
CHAPTER 4
Commands
Command Definitions 113
referenceToFile A reference of the form file nameString or alias nameString
that specifies the file in which to save the objects (see “Notes”).
Class: Reference
Default value: The file in which the object was last saved. If
the object has not been saved before, the application creates a
new file.
RESULT
None
EXAMPLE
save document "Stupendous" in file "Elephantine"
NOTES
To specify the name (nameString) of a file in which to save the specified object or
objects, 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 you use the form file nameString and the specified file is not present in the
specified location, the application creates a file with the specified name in that
location. If you use the form alias nameString and the specified file is not
present in the specified location, the script won’t compile.
Set AppleScript command, application command4
The Set command can function as an AppleScript command or an application
command. The AppleScript command assigns one or more values to one
or more variables. It can also be used to share data among lists, records, or
script objects (see “Notes”). The application command sets the values of one
or more objects.