Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Stagger startup items for less system impact' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Stagger startup items for less system impact
Authored by: wallybear on Jul 18, '06 08:05:30AM

you can make the script shorter replacing:

tell application "whatever"
launch
end tell

with

tell application "whatever" to launch

and if you can get your hands dirty with shell commands, you can use the following script without using delays:

open "/Applications/Mail.app" ; open "/Applications/Safari.app" ; open "/Applications/whatever.app"

Of course this is more complicated as you have to know the correct path for every application to start, but you can incorporate it in an AppleScript using the "do shell command" command. This method launches one app after the previous one finished launching, so no delay is necessary.



[ Reply to This | # ]
10.4: Stagger startup items for less system impact
Authored by: NB on Jul 18, '06 08:29:44AM

"open -a Mail" works quite well you know.



[ Reply to This | # ]
Summation plus correction
Authored by: MtnBiker on Jul 18, '06 09:47:16AM
I think this is a working sample

delay 40
do shell script "open -a iKey; open -a Skype; open -a Butler;"
The correction is "script" not "command." Thanks to all the posters. I've never been happy with my other solutions to this problem. I think the serial shell script solution will work for me.

---
Hermosa Beach, CA USA

[ Reply to This | # ]

Summation plus correction
Authored by: wallybear on Jul 18, '06 10:54:59AM

That's correct. My mistake.
It's "do shell script", not "do shell command".



[ Reply to This | # ]
Summation plus correction
Authored by: babbage on Jul 18, '06 12:27:33PM

For that matter, the shell code can do the delays too, with something like:

sleep 20
open /Applications/MyApp.app
sleep 2
open -a Mail
sleep 2
open /Applications/Safari.app/Contents/MacOS/Safari

Et cetera. Note that sleep in the shell code replaces the delay in the Applescript, and that the three variants of the open command can all be used more or less interchangeably. The second version is usually shortest, but the short name for an app launched this way isn't always obvious, e.g. I think the Office programs all have slightly oddball short names, but off the top of my head I can't remember what they were, or how to look that string up. Using the other two versions is a little more typing, but it's guaranteed to work.

---

--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

10.4: Stagger startup items for less system impact
Authored by: triplef on Jul 19, '06 02:02:08AM
This method launches one app after the previous one finished launching, so no delay is necessary.
This isn't the case here using Mac OS X 10.4.7. On my system, "open" returns immediately, i.e. before the opened app finishes bouncing in the Dock.

Using multiple Finder actions to open applications in Automator worked though. Using this method the apps are launched sequentially.

[ Reply to This | # ]