Run on Shutdown

Is there a way I can set an applescript I wrote to automatically run on shutdown?

You can make a background daemon that launches apps on shutdown:
¢ Make a new applescript app
¢ add an “on quit” handler that launches/opens the desired apps/scripts or does anything else you want
¢ add it to the loginitems
¢ (to make it a background app add a boolean “LSUIElement” property with value “true” to its “Info.plist”)

This’s how I do it!
Hope this helps!

Vince

Also check out Mike Bombich’s LoginWindowManager which allows you to add logout hooks (as well as a lot more) that can run scripts at logout.

Jon

Okay, so I finally got around to setting this up and it works like a charm. Now, I just need to make the application run in the background. I got your tip before but I don’t understand it. How do I add a plist file and what format does it need to be in. I am not very good with that stuff. DO you know of any tutorials on backgrounding apps? The only ones I can find are for OS 9.

You could try this: Drop Script Backgrounder