Re: Active application - how to tell?
Re: Active application - how to tell?
- Subject: Re: Active application - how to tell?
- From: "John W. Baxter" <email@hidden>
- Date: Tue, 22 Jun 2004 15:16:07 -0700
On 6/22/2004 10:11, "Christopher Nebel" <email@hidden> wrote:
>
On Jun 22, 2004, at 1:58 AM, Christopher Stone wrote:
>
>
> At 09:59 +0200 06/22/2004, Peter Mathiessen wrought:
>
>
>
>> How do I tell the System event application if an application is
>
>> running or
>
>> not?
>
>
>
> You can do something like this:
>
>
>
> tell application "System Events"
>
> if exists (process 1 whose name is "Tex-Edit Plus") then
>
>
...which is really just a complicated way of saying
>
>
tell application "System Events"
>
if exists process "Tex-Edit Plus" then
>
...
Which in turn is just an un-English-like way to say
tell application "System Events"
if process "Tex-Edit Plus" exists then
...
(Exists remains the only verb with which I normally do this, but it
certainly reads better--to me.)
Tested on 10.3.4 with
tell application "System Events"
if process "BBEdit" exists then
display dialog "Oh! Frabjous day"
end if
end tell
_______________________________________________
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.