(*
QUIT ALL APPLICATIONS
1.0.1
A script which quits each running application, in the same order
as a system shutdown or restart -- i.e. most recently launched first.
© 1996 Phil Hudson. May be freely used and distributed. Comments
and bug reports please to:
Released 18 Nov 1996.
Scripting additions required:
- List Applications (Copyright 1993 GTQ Programming)
- Application Info (Copyright 1993 GTQ Programming)
- This Application (Copyright 1993 GTQ Programming)
- Jon's Commands (Copyright 1996 Jon Pugh)
Warning:
- This script cannot quit AppleEvent-unaware applications.
Revision history:
- 1.0:
- Initial release.
17 Oct 96.
- 1.0.1:
- Added calls to "set cursor to busy".
18 Nov 96.
*)
set cursor to busy cursor with cursor list "MPW Cursor"
set appList to (reverse of (list applications)) -- list all currently running apps, youngest first
repeat with appX in appList -- for each app in turn:
set cursor to busy cursor
set bar to (application info for appX)
if ((type of bar) = "APPL") then -- don't try to quit Finder or faceless background apps
if (name of bar is not (name of (application info for (this application)))) then -- don't try to quit self
ignoring application responses -- don't wait for a response/result
with transaction -- fire off both commands in one package
tell appX
activate -- won't work without this!
quit
end tell
end transaction
end ignoring
end if
end if
end repeat
set cursor to arrow cursor