Mac – Run AppleScript on startup (background)

autorunbootmacosx-snow-leopardscript

I want to run a apple-script on Mac OS X on startup.
The script shall run during the complete lifetime of the user session.

What is the best solution to do this?

My Script:

on idle
    do shell script "/usr/local/bin/wol -p 9 0:1d:63:19:b7:32"
    delay 120
end idle

Any help will be very appreciated.

Best Answer

When saving the script in the script editor, save as an application bundle, then add it to the startup items in login system preferences:

alt text

If you want it to run in the background, you can use iBackground Scripts, a free tool to make applescripts run in the background.

alt text

Related Question