Re: close all programs
Re: close all programs
- Subject: Re: close all programs
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 28 Mar 2003 14:21:10 -0500
Date: 28 Mar 2003 10:26:07 +0100
From: =?iso-8859-1?Q?J=FCrgen_Keser?= <email@hidden>
Subject: close all programms
To: <email@hidden>
Reply-To: =?iso-8859-1?Q?J=FCrgen_Keser?= <email@hidden>
Hi AppleScripters,
I have an simple question. Is there a simple command that quits all
opened programms in OSX?
Now I must tell all applications and quit them on after the other.
But there are some programms I opened only sometimes. So it would be
better, to close only all the programms that are opened.
Thank you in advance.
Greetings,
J|rgen
This seems to do the job. The conditional with the list excludes apps
you don't want to close. If you really want to close everything it can
be omitted.
tell application "Finder"
set visible of application processes to true
delay 5 --to give the Finder time to make things visible
set appList to the name of application processes whose visible is
true
end tell
repeat with aName in appList
if (aName as text) is not in {"Finder", "Script Editor", "Mail"}
then
try --in case we hit something that won't quit
tell application (aName as text) to quit
end try
end if
end repeat
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[03/28/03 2:20:51 PM]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.