Created
April 29, 2012 09:36
-
-
Save roxlu/2549033 to your computer and use it in GitHub Desktop.
Keep application running, auto restart on crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on appIsRunning(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end appIsRunning | |
on makeActive(appName) | |
tell application appName | |
activate | |
end tell | |
end makeActive | |
repeat | |
if appIsRunning("emptyExampleDebug") then | |
else | |
do shell script "open -a /Users/diederick/Documents/programming/c++/of/app/projects/peepee/game/bin/appdebug.app/Contents/MacOS/appDebug" | |
end if | |
makeActive("appDebug") | |
delay 25 | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or you could use Lingon on Mac OS X. It basically puts an xml file with the right settings in ~/Library/LaunchAgents
http://www.peterborgapps.com/lingon/