Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: script needed to force shutdown w/o any prompts/interference



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.


References: 
 >script needed to force shutdown w/o any prompts/interference (From: Laura Robinette <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.