Re: Restarting & Initialising (was: (no subject))
Re: Restarting & Initialising (was: (no subject))
- Subject: Re: Restarting & Initialising (was: (no subject))
- From: Mr Tea <email@hidden>
- Date: Thu, 01 Feb 2001 10:24:42 +0000
This from Braulio Gonzales - dateline 2/1/01 12.21 am:
>
When I ran the script, the AppleScript
>
skipped the restart command, is there a way that i can make AppleScript run
Hi Braulio.
It is not possible to have a single script that will continue to run through
a restart.
But you can split your script into two separate scripts, one to change the
startup disk, the other to initialise the original startup disk after you
have restarted.
In your first script, change the startup disk, move the second script to the
startup items folder of the new startup disk, then restart.
Now the second script will run automatically, and you can include a line in
it that will make the script remove itself from the startup items folder
when it runs (so that you don't re-initialise the original startup disk
every time you start up from the other disk).
Incidentally, you can replace all these lines in your script:
select startup disk
open selection
select folder "Utilities" of startup disk
open selection
select file "Drive Setup" of folder "Utilities" of startup disk
open selection
close container window of folder "Utilities" of startup disk
...with the single line:
open file "Drive Setup" of folder "Utilities" of startup disk
When you are recording your actions in a script, it's often a good idea to
open the folders containing items you want to move/open/rename or whatever
BEFORE you start recording, then you won't have all that 'delving down
through endless subfolders' gubbins in your scripts.
(Note also, that if you upgrade to OS 9.1, the path to the Utilities folder
will change, so your script will need rewriting)
set startup disk to "Boot Disk"
And finally - always remember to put a descriptive subject line on your
message, otherwise it may be ignored by other list contributors.
Cheers
Mr Tea
--
"Let the pot stand for at least five minutes before serving."