• 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: Quitting applications and applescript studio application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quitting applications and applescript studio application


  • Subject: Re: Quitting applications and applescript studio application
  • From: J Stewart <email@hidden>
  • Date: Wed, 20 Apr 2005 17:45:00 -0400

On 4/20/05 at -0600 Martha I. Espinosa said this

>I'm having problems with the following applescript:
>
>tell application "System Events"
>   set RunningApps to the name of every process whose visible is true
>end tell
>
>repeat with CurrentApp from 1 to (the count of text items in RunningApps)
>   set WhichApp to (text item CurrentApp of RunningApps)
>   if (WhichApp is not in {"Finder"}) then
>       tell application WhichApp to quit
>   end if
>end repeat


Try this and see if it suits you, mind the line wrapping.

--> cut <--
tell application "System Events" to set RunningApps to the name of (every process whose visible is true)

repeat with CurrentApp in RunningApps
    if (contents of CurrentApp) is not "Finder" then tell application (contents of CurrentApp) to quit
end repeat
--> cut <--

JBS
--
I drive way too fast to worry about cholesterol.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Quitting applications and applescript studio application (From: "Martha I. Espinosa" <email@hidden>)

  • Prev by Date: Quitting applications and applescript studio application
  • Next by Date: simple file copy
  • Previous by thread: Quitting applications and applescript studio application
  • Next by thread: simple file copy
  • Index(es):
    • Date
    • Thread