Finding out is an Application is running
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.