|
|
#1 |
|
All Star
Join Date: Jan 2002
Location: New York, NY
Posts: 967
|
Login Items - delay intended
I have several programs to launch, as startup items.
I've noticed that everytime I startup, every program in my Login Items list tried to launch at the same time - crunching the drive up and slowing things down. What's the best way to force the startup process to load each program up, one at a time? Jacques |
|
|
|
|
|
#2 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,938
|
You could write an AppleScript to launch the apps at the rate that you want.
|
|
|
|
|
|
#3 |
|
All Star
Join Date: Jan 2002
Location: New York, NY
Posts: 967
|
I tried to do this with the AS editor, by hitting record and launching each program - it turns out only some would record.
Does it only record programs that are AS aware? ..or Cocoa? Jacques |
|
|
|
|
|
#4 |
|
Major Leaguer
Join Date: Dec 2002
Posts: 441
|
Code:
tell application "some application" to activate do shell script "/bin/sleep 2" tell application "another application" to activate do shell script "/bin/sleep 4" tell application "big application" to activate do shell script "/bin/sleep 20" tell application "onelast application" to activate |
|
|
|
|
|
#5 |
|
League Commissioner
Join Date: Jan 2002
Posts: 5,536
|
isn't there an AS delay or wait command?
|
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Nov 2002
Location: Montréal, QC, Canada
Posts: 331
|
yes.
it's Code:
delay 1
__________________
sometimes i wish i could pipe my customers to /dev/null |
|
|
|
|
|
#7 |
|
All Star
Join Date: Jan 2002
Location: New York, NY
Posts: 967
|
Okay, I'll try it. Thank you.
My assumption was that because the AS recorder didn't catch some of those applications launching, I would have to find another solution. Jacques |
|
|
|
|
|
#8 | |||||||||||||||||||
|
Major Leaguer
Join Date: Dec 2002
Posts: 441
|
Due to a bug in AppleScript, the delay command usually consumes nearly 100% of the available CPU. The do shell script "/bin/sleep n"syntax consumes almost no CPU resources. Last edited by gatorparrots; 02-02-2004 at 06:35 PM. |
|||||||||||||||||||
|
|
|
|
|
#9 |
|
Major Leaguer
Join Date: Nov 2002
Location: Montréal, QC, Canada
Posts: 331
|
and the truth is revealed. ;-)
__________________
sometimes i wish i could pipe my customers to /dev/null |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|