Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 4 - Commands / Command Definitions


Save application command

A Save command is a request to save an object or objects.

SYNTAX
save referenceToObject [ in referenceToFile ]
PARAMETERS
referenceToObject
A reference to the object or objects to be saved.
Class: Reference
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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996