Re: Quit an application
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