How To: Launch Login Items Via Applescript and Avoid Login Delays

I stumbled upon this cool trick on MacOSXHints yesterday, and I believe it's amazing: basically, it lets you open all your login items via applescript instead of saving them into your account Preferences. Many people reported issues with login items in Snow Leopard - me too - so this is just perfect.

Fire up Applescript editor and type:

tell application "Notify" to launch

delay3

Obviously, you can replace Notify with the app you like, be sure to write it between the quotes. Then, simply repeat those two strings for all your login items.

Here's mine:

tell application "ClipMenu" to launch

delay 3

tell application "Caffeine" to launch

delay 3

tell application "Cloud" to launch

delay 3

tell application "Notify" to launch

delay 3

tell application "FastScripts" to launch

delay 3

Delay3 is useful for preventing the applications to launch at the same time. You can replace to launch with to activate if you'd like to bring the app to front.

And last, you can save the script as an application bundle and add it to your login items. But if you have problems with your login items (as I said before) you can put the app in your dock, or in a stack. It's up to you.