I rely on Dropbox for syncing work files between two computes that are powered on 24/7. For some reason, Dropbox terminates (crashes or quits) after long periods of time, with no explanation. I just find later that the application is no longer running.
Is there a way I can get notified (e.g. via a popup) when a certain application terminates?
I'm thinking there might be a way for AppleScript to do this, but I'm unsure where to begin.
Best Answer
Quite easily with an Applescript:
You could replace "display alert" with
tell application 'Dropbox' to launch
..to have it automatically restart if you desire.Paste this into
Script Editor
. save it, and then you could add the script to your user's startup items for future use. The timing there may be a bit tricky though if the script starts before Dropbox - adding adelay 10
or something before the firstrepeat
would solve this.For future use, anything involving
System Events
is a great place to look for solutions to these kinds of meta-system-wide tasks.