Re: Quit all programs
Re: Quit all programs
- Subject: Re: Quit all programs
- From: "Marc K. Myers" <email@hidden>
- Date: Sun, 9 Nov 2003 01:11:43 -0500
Date: Sat, 08 Nov 2003 07:38:26 +0000
Subject: Quit all programs
From: Sovereign Diamonds <email@hidden>
To: <email@hidden>
I'd like to automatically quit all running programs without having to
go through the 'do you want to save' routine followed by an orderly
'shut down' instruction via applescript.
Is there a Terminal command to kill all running programs in one swoop?
Or is there an applescript way?
You could try this:
property exList : {"Finder", "Script Editor"}
tell application "System Events"
set visible of application processes to true
set nameList to name of application processes whose visible is true
end tell
repeat with aName in nameList
set theName to (aName as text)
if theName is not in exList then
log "killall -m '" & theName & "'"
--do shell script "killall -m '" & theName & "'"
end if
end repeat
The exList contains the names of processes that you don't want to kill.
Please note that it is set up to display the shell script but not to
execute it. To activate it, lose the log line and uncomment the next
one.
As others have noted, you can mess yourself up by not closing
applications normally. I wouldn't use this script myself. Use at your
own risk.
I am not responsible! ;-)
Marc [11/09/03 1:08:58 AM]
_______________________________________________
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.