• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: script needed to force shutdown w/o any prompts/interference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


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

  • Prev by Date: Re: String works, variable that's a string does not.
  • Next by Date: Re: String works, variable that's a string does not.
  • Previous by thread: Re: script needed to force shutdown w/o any prompts/interference
  • Next by thread: [OT?] Formatting of AS code on Apple pages
  • Index(es):
    • Date
    • Thread