Re: Quit All Applications
Re: Quit All Applications
- Subject: Re: Quit All Applications
- From: "Marc K. Myers" <email@hidden>
- Date: Wed, 24 Jan 2001 00:30:40 -0500
- Organization: [very little]
Charles Arthur wrote:
>
Date: Wed, 24 Jan 2001 00:28:24 +0000
>
To: Applescript Users <email@hidden>
>
From: Charles Arthur <email@hidden>
>
Subject: Re: Quit All Applications
>
Cc: carver <email@hidden>
>
>
On Tue, 23 Jan 2001 13:17:53 -0500, carver <email@hidden> wrote"
>
>
>Does anyone know how to quit all currently running applications without
>
>quiting the finder?
>
>
Something like:
>
>
tell application "Finder"
>
set theprocesses to name of application processes
>
repeat with a in theprocesses
>
if a is not "Finder"
>
tell application a
>
quit
>
end tell
>
end if
>
end repeat
>
end tell
This script, as written, will send a "quit" to the Finder for each app
that's running, quitting the Finder and not the apps. You can't put a
"quit" inside a tell to the Finder. You have to put it in a separate handler:
tell application "Finder"
.................
tell me to doQuit(a)
.................
end tell
on doQuit(theApp)
tell application theApp to quit
end doQuit
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[1/24/01 12:29:57 AM]