Re: how to tell if a particular application is running?
Re: how to tell if a particular application is running?
- Subject: Re: how to tell if a particular application is running?
- From: Steven Angier <email@hidden>
- Date: Fri, 18 Jan 2002 08:37:23 +1100
- Organization: Macscript.com
billp wrote:
>
I want to make a subscript conditional upon a particular application
>
running. I know I need to frame it in a try statement.
The Macscript.com Library includes several (20) process/application functions you might
find useful, including:
IsProcessRunning(theProcess)
theProcess string -- string, file spec, or alias; the creator type, file, or name of the
process to test
Result: boolean -- true if the given process is running; false if it is not
For example, if you wanted to know if SimpleText was running, you could call:
IsProcessRunning("ttxt") -- the creator type of SimpleText (or TextEdit on Mac OS X)
IsProcessRunning("SimpleText") -- by name
IsProcessRunning("Macintosh HD:Path:To:SimpleText") -- by file if you prefer
A demo is available from
http://www.macscript.com
Steven Angier
Macscript.com