• 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: Quit an application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quit an application


  • Subject: Re: Quit an application
  • From: Nigel Garvey <email@hidden>
  • Date: Thu, 23 Aug 2001 23:43:03 +0100

Elric wrote on Wed, 22 Aug 2001 17:11:20 +0200:

>Hello,
>
>I want to make an Applescript to quit an application that I don't know if
>it is running or not.

A simple way to do this would be:

tell application "Finder"
if process "MyApp" exists then tell application "MyApp" to quit
end tell

However, a 'quit' command can sometimes cause mischief when it's in a
Finder 'tell' block, so:

tell application "Finder"
process "MyApp" exists
end tell
if (result) then tell application "MyApp" to quit

NG


  • Prev by Date: Applescript & Tex-Edit Plus
  • Next by Date: choose folder promt from loced disk
  • Previous by thread: Quit an application
  • Next by thread: open for access
  • Index(es):
    • Date
    • Thread