Re: script needed to force shutdown w/o any prompts/interference
Re: script needed to force shutdown w/o any prompts/interference
- Subject: Re: script needed to force shutdown w/o any prompts/interference
- From: Glenn Sugden <email@hidden>
- Date: Wed, 28 Apr 2004 15:37:33 -0700
I use this to quit all of my (visible) applications quickly (asking
about unsaved documents). Maybe this'll give you a start?
The two properties are: whether or not to include invisible
(background) applications in the quitting process, and whether or not
to ask/always/never save unsaved documents in an application being quit
(note that the quitting shall continue none-the-less... ;-)
---
property quit_only_visibles : true
property save_ask_yes_no : ask
tell application "System Events"
set this_applet_name to (name of the first process whose frontmost is
true)
set running_applications to (name of processes whose visible is
quit_only_visibles)
end tell
repeat with counter from 1 to (count of running_applications)
if ((item counter of running_applications) is not this_applet_name)
then
try
with timeout of 1 second
quit application (item counter of running_applications) saving
save_ask_yes_no
end timeout
end try
end if
end repeat
---
I'm listening to "Addiction" by Skinny Puppy from Cleanse Fold And
Manipulate
<
http://www.gracenote.com/music/search.html?
q=Skinny+Puppy+Cleanse+Fold+And+Manipulate&f=artist&f=disc&x=0&y=0>
_______________________________________________
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.