Re: getting application running information.
Re: getting application running information.
- Subject: Re: getting application running information.
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 24 May 2002 00:57:49 -0700
On 5/24/02 12:30 AM, "ben" <email@hidden> wrote:
>
Hi$
>
>
How can I check if a specific application is running? I only want to execute
>
a given function of my script if that application is running either in the
>
background or the foreground. How am I to go on about this?
>
tell application "Finder" to set procs to name of every process
if procs contains {"Application Name"} then...
If the application on question has different names in different versions,
then first learn what its 4-character creator type is if you don't know it:
tell application "Finder" to set creaType to creator type of process
"Application Name" --(if it's running, or else:
tell application "Finder" to set creaType to creator type of file
"MacHD:A Folder:Application File" )
)
and then use this:
tell application "Finder" to set creaTypes to application file id of
every application process
if creaTypes contains {"XXXX"} then... -- use app's creator type
The creator type is case-sensitive.
--
Paul Berkowitz
_______________________________________________
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.