Re: Testing for running app?
Re: Testing for running app?
- Subject: Re: Testing for running app?
- From: Sander Tekelenburg <email@hidden>
- Date: Wed, 4 Apr 2001 04:58:56 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 18:19 -0500 UTC, on 02/04/2001, T.J. Mahaffey wrote:
>
[...] how to test for whether or not an app is running.
>
>
I'd like to do something like this:
>
>
if app "Cumulus 5 Client" is running
>
>
-- do something neat
>
>
else
>
>
-- do something else
>
>
end if
You can ask the Finder what processes are running, then use the result it
returns:
tell application "Finder"
exists process "Cumulus 5 Client"
set theExistence to the result
end tell
if theExistence is true then
-- do something neat
else
-- do something else
end if
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBOsqN4+sywKfXgqKdEQLLVQCeKXutJIDs3K2wW8D7lEVJfi1Gt10AoNt8
1APSq7mIdUIGphAKeNZrtRJr
=7pvA
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <
mailto:email@hidden>
Web site at <
http://www.euronet.nl/~tekelenb/>
Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"