-- this script emulates the OS 9 (and earlier) startup items folder, with the added ability to stagger and delay launches
-- to use this script,
-- 1. make a new folder in your preference folder (the one in the library in your home directory) called (exactly)
-- staggeredlaunchitems
-- 2. put aliases of the files you want to open/applications you want to launch into the staggeredlaunchitems
-- 3. customize the delays, if desired, in the two "set" commands at the top of the script
-- 4. save this script as an application, and make it a login item in (in accounts under system prefs)
set launchdelay to 10 -- change this as required to customize the number of seconds before the first item launches
set itemdelay to 5 -- change this as required to customize the number of seconds between launches
tell application "Finder"
set launchitemsfolder to (path to preferences folder as string) & "staggeredlaunchitems"
delay launchdelay
repeat with x from 1 to (the number of files of folder launchitemsfolder)
set thefile to (file x of folder launchitemsfolder) as string
do shell script "open " & (quoted form of POSIX path of thefile)
delay itemdelay
end repeat
end tell
quit
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)