Semi-newbie looking to learn

Hi folks, my name is Lawrence and I am trying to learn more about applescript.

I have a server running Adobe Acrobat distiller and sometimes the actual Adobe Acrobat Distiller program will quit when an improperly formatted PDF is distilled.
I request help on how to make a script that continuously runs in the background and checks every minute if Adobe Acrobat distiller is running. And if it isn’t, the script will automatically reload Distiller.
I have tried to write a script myself and I have gotten (seemingly) close but with no luck.

I would really appreciate any help you could give.

Model: XserveG5, PMG5, MacBookPro
AppleScript: newest
Browser: Firefox 1.5.0.2
Operating System: Mac OS X (10.4)

This might help (I tested it with TextWrangler). You should check in the Activity Monitor app to see what AAD is called there and put that in the “exists process” bit.

on run
	run application "TextWrangler"
end run

on idle
	tell application "System Events" to if not (exists process "TextWrangler") then run application "TextWrangler"
	return 5 -- the units are seconds
end idle

Thank you very much Adam! I really appreciate the help.

I had pretty much the same thing except that I could not make the script run in the background…

I saved it as an app with the “keep open” option and that worked but is there any other way to make a script run in the background without having it’s icon stay in the dock (run in the background and only show up in the Activity Monitor)?

Thanks again for the help.

Check out Drop Script Backgrounder, sorenmd.