Previous Book Contents Book Index Next

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


Quit application command

A Quit command is a request for an application to terminate. If no optional parameters are specified, the Quit command has the same result as choosing the Quit menu item in the application.

SYNTAX
quit referenceToApplication [ saving saveOption ]
PARAMETERS
referenceToApplication
A reference of the form application nameString, where nameString is a string that matches the name of the application you want to quit as it is listed in the Application menu.
Class: Reference
saveOption
A constant that specifies whether to save documents that have been modified before quitting. The possible values are yes, no, and ask. The value yes specifies to save the documents. The value no specifies not to save the documents. The value ask specifies to ask the user whether or not to save the documents.
Class: Constant
Default Value: ask
RESULT
None

EXAMPLES
tell application "Scriptable Text Editor"
   quit saving no
end tell
quit application "Scriptable Text Editor" saving ask 

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996