• 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
Finding out is an Application is running
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finding out is an Application is running


  • Subject: Finding out is an Application is running
  • From: Andrew <email@hidden>
  • Date: Wed, 11 Feb 2004 15:57:29 -0500

I was wondering if there was any way of figuring out if an application file
at some path is currently running.

The way I do it now is by the insane :

on appIsRunning(applicationFile)
tell application "Finder"
set processList to every process
repeat with myIndex from 1 to number of items in processList
set systemProcess to item myIndex of processList
if (exists application file (application file of systemProcess
as string)) then -- this junk is here to get around a bug in Applescript
set testApp to application file (application file of
systemProcess as string)


if (testApp as string = applicationFile as string) then
return true
end if
end if
end repeat
end tell

return false
end appIsRunning

Which tends to be insanely slow and I think it's causing the script to be
really unstable.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Finding out is an Application is running
      • From: Christopher Nebel <email@hidden>
    • Re: Finding out is an Application is running
      • From: Emmanuel <email@hidden>
    • Re: Finding out is an Application is running
      • From: Martin Orpen <email@hidden>
    • Re: Finding out is an Application is running
      • From: Gnarlodious <email@hidden>
  • Prev by Date: Release compound path in Illustrator
  • Next by Date: Close all windows
  • Previous by thread: Re: Release compound path in Illustrator
  • Next by thread: Re: Finding out is an Application is running
  • Index(es):
    • Date
    • Thread