Does anybody know a way, maybe a script, to test for if an App is running? Any help is appreciated.
EDIT (26.06.2013 - 22:07 ) : Never mind, I figured it out myself:
I've employed an apple script to test if an app (in my case nvALT) is running or not. If that app is running the script returns false (in hazel logic this means the file didn't match) otherwise it returns true:
- Code: Select all
on hazelMatchFile(theFile)
set nvRunning to is_running("nvALT")
if nvRunning then
return false
else
return true
end if
end hazelMatchFile
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
It does work for me, may be it does for you, too.