Check periodically... [for running application]


Can anyone advise (or better yet share) on a script which would check to see if a given application (iChat) was running, and if it wasn’t, open it, and if it was, do nothing? Would this be an easy thing to accomplish with AS?


Hi htorvisque

StefanK has this sorted quite nicely in this thread.



You can use the ‘exists’ command also. e.g.

tell application "System Events"
	set iChat_running to exists process "iChat"
end tell
if not iChat_running then tell application "iChat" to activate

Note that you could just tell application “iChat” to activate without checking if it’s running, but I don’t know if nothing will be done if it is running. Some apps might open a new window or something.