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

Is app running?


  • Subject: Is app running?
  • From: Brennan <email@hidden>
  • Date: Fri, 6 May 2005 01:44:38 +0200

Hi folks,

I feel a bit dumb, because I feel sure this has been up before and I can't
find it in my archive.

Should be simple. I need to find out whether a specific app (in this case
QuickTime player) is running. At the moment I am using:

tell application "Finder"
  (application processes whose name contains "QuickTime Player") is {}
end tell

This works, but is there a way to do this without using the Finder? (And
preferably without launching any other apps).

Maybe it's an old OS9 habit dying hard (where calls to the Finder had
significant performance overheads).

I am part of the way there with a shell script. I have some small working
chunks, but am a bit stuck piecing them together, for example:

do shell script "top -l1 | grep 'QuickTime*' | cut -f2 -d' '"

This returns pid if Quicktime Player is running, or "" if not, but may
return false positives. (i.e. Other users' copies of the app, or other
apps that start with the word 'QuickTime').

I may be barking up the wrong tree.

Is there another solution that I have overwoofed?

Brennan
 _______________________________________________
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

  • Follow-Ups:
    • Re: Is app running?
      • From: kai <email@hidden>
    • Re: Is app running?
      • From: Paul Berkowitz <email@hidden>
    • Re: Is app running?
      • From: Bill Cheeseman <email@hidden>
    • Re: Is app running?
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Word scripting reference
  • Next by Date: Re: Nice Automator article on O'Reilly
  • Previous by thread: ScanWise & AppleScript
  • Next by thread: Re: Is app running?
  • Index(es):
    • Date
    • Thread