Re: Getting running status of an application
Re: Getting running status of an application
- Subject: Re: Getting running status of an application
- From: "J.B. Stewart" <email@hidden>
- Date: Fri, 31 Aug 2001 05:33:59 -0400
On 8/31/01 at 12:20 AM, Bob.Kalbaugh <email@hidden> wrote:
>
on 8/30/01 7:39 PM, Ric Phillips at email@hidden wrote:
>
>
> Then check the result window which will display a list with the name of the
>
> running processes. Your application should be in the list. You can then use
>
> its name in the following manner,
>
>
> tell application "finder"
>
> if process "<name of process>" exists then
>
> quit "<name of app>"
>
> end if
>
> end tell
>
>
Can you please expand upon this, for no matter what application I try...
>
>
the Finder Quits! ouch!
>
>
Luckily I was able to get it back with a tell Finder to activate from Script
>
Editor
>
>
example of my try:
>
>
tell application "Finder"
>
if process "Tex-Edit Plus" exists then
>
quit "Tex-Edit Plus"
>
end if
>
end tell
>
>
Am I missing something here? (and yes, I'm using the exact name)
>
>
thanks much.
>
>
Bob "Hell, I'll try anything" Kalbaugh
You aren't so much "missing" anything as you are slightly misusing it.
>
> tell application "finder"
>
> if process "<name of process>" exists then
>
> quit "<name of app>"
>
> end if
>
> end tell
Specifically tells the Finder to quit
Try
>
> tell application "finder"
>
> if process "<name of process>" exists then
tell application "<name of app>" to quit
>
> end if
>
> end tell
or better yet
Tell application "Finder" to set procList to name of every process
if "NameOfProcess" is in procList then tell application "<name of app>" to quit