• 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: Is app running?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Is app running? (From: Brennan <email@hidden>)

  • Prev by Date: Re: Tiger: System Events now runs scripts
  • Next by Date: Script as internet helper protocol in tiger
  • Previous by thread: Is app running?
  • Next by thread: Re: Is app running?
  • Index(es):
    • Date
    • Thread