Re: Is app running?
Re: Is app running?
- Subject: Re: Is app running?
- From: Emmanuel <email@hidden>
- Date: Fri, 6 May 2005 09:01:14 +0200
At 1:44 AM +0200 5/6/05, Brennan wrote:
do shell script "top -l1 | grep 'QuickTime*' | cut -f2 -d' '"
What's the problem requiring the full name?
Personally I do:
"QuickTime Player" is in (do shell script "ps -xwwc")
You get true only if QuickTime Player is one of your processes. Of
course, this is fooled if an app's name is "FooQuickTime PlayerBar",
but I'm not sure you want to spend much time to protect your script
against that risk.
OMM (G3 900MHz), the command above runs in 0.07 to 0.09 second.
Your Finder's block runs in 0.04 or 0.08, depending whether I test a
true or a false situation.
The "top" line runs in 0.6 to 1.0 second.
If you prefer words to figures: Finder is not so bad at that, and
your "top" line is rather slow.
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden