Drobo

Simple AppleScript to Delay the Launching of an Application

Hi,

Someone asked me about how they could delay the launch of a app on their Mac when they first log into their account because their DroboShare wasn’t mounted right away. This is actually very easy. You can use a simple AppleScript to delay the launch. Here is the code (paste it into the AppleScript Editor found in Applications > Utilities):


delay 60
try
tell application “Address Book”
activate
end tell
end try

The delay (60) is in seconds and you can replace “Address Book” with with app you want to launch. You could do this with multiple apps if you repeat the try/end try section.

Once you have the script setup the way you want it, simply save it as an Application (File > Save As). Next, add your new AppleScript application to your login items (System Preferences > Accounts > Login Items).

Hope others find this useful.