• 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: Active application - how to tell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: Active application - how to tell? (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: quit the dock - possible?
  • Next by Date: Re: Creator code?
  • Previous by thread: Re: Active application - how to tell?
  • Next by thread: Newbie Text Manipulation
  • Index(es):
    • Date
    • Thread