RE: Scripting "Startup Disk"
RE: Scripting "Startup Disk"
- Subject: RE: Scripting "Startup Disk"
- From: "Alatorre, Michael" <email@hidden>
- Date: Mon, 5 Aug 2002 20:50:23 -0700
You're welcome. However, almost all of this was gleamed from the people on
this list, and Apple's and MacObserver's AS discussion forums. All of them
are a generous and knowledgeable lot.
>
----------
>
From: Ted Pearson
>
Sent: Monday, August 5, 2002 5:18 PM
>
To: Alatorre, Michael
>
Cc: 'email@hidden'
>
Subject: Re: Scripting "Startup Disk"
>
>
Thanks a lot, Michael. I was looking into this on behalf of an online
>
friend (at http://www.macfora.com/ ), and she will be happy to know that
>
I have found an answer. I will just test them on my computer before
>
sending them along.
>
>
Thanks a lot.
>
>
Ted
>
>
On Monday, August 5, 2002, at 01:07 PM, Alatorre, Michael wrote:
>
>
>> I am trying to write a script that will change the startup system
>
>> folder
>
>> to the Mac OS X system folder and then restart the computer.
>
>
>
> Since I do this often enough, I use the following scripts (saved as
>
> applications) to automate booting into the other OS:
>
>
>
> -- restart script code from OS 9 into OS X
>
> -- be sure to modify the hard disk name to your own
>
> beep
>
> display dialog "Do you really want to restart in OS X?" buttons
>
> {"Cancel",
>
> "OK"} default button 2 ,
>
> with icon 2
>
>
>
> if button returned of result is "OK" then
>
> say "Restarting in OS 10"
>
> tell application "Startup Disk"
>
> activate
>
> set startup system folder alias to alias "OS
>
> X:System:Library:CoreServices:BootX"
>
> end tell
>
> tell application "Finder" to restart
>
> end if
>
>
>
> Since OS 9 will allow me to assign this applet to a function key, I
>
> assigned
>
> it to F15 on my desktop machine (F11 on my laptop) and launch it simply
>
> by
>
> pressing that key.
>
>
>
> -- restart script code from OS X into OS 9
>
> property mypassword : "" -- embed password as property
>
> if mypassword = "" then
>
> set mypassword to text returned of ,
>
> (display dialog ,
>
> "Input your password to embed the property in this
>
> application--you'll only be asked once so type carefully.
>
> (beware: your keyed response will display! Be cautious of wondering
>
> eyes.)"
>
> default answer "")
>
> end if
>
>
>
> beep
>
> display dialog "Do you really want to restart in OS 9?" buttons
>
> {"Cancel",
>
> "OK"} default button 2 ,
>
> with icon 2
>
>
>
> if button returned of result is "OK" then
>
> do shell script ,
>
> "/usr/sbin/bless -folder9
>
> '/Volumes/NameOfYourOS9HardDrive/System Folder' -setOF" password
>
> mypassword
>
> with administrator privileges
>
> say "Restarting in OS 9"
>
> end if
>
>
>
> ignoring application responses
>
> tell application "Finder" to restart
>
> end ignoring
>
>
>
> Currently, OS X doesn't allow me to assign this applet to a function
>
> key (at
>
> least that I know of), so I place it in the Dock for quick access.
>
> Remember,
>
> since you're embedding your password into the applet, only work with a
>
> copy
>
> of that file in case you screw up the password or wish to share it with
>
> others. HTH
>
>
>
> Michael Alatorre (mailto:email@hidden)
>
> EIS Liaison Analyst
>
> Cedars-Sinai Health System (http://www.cedars-sinai.edu/)
>
> Medical Affairs: 310.423.6237 310.423.0448 (fax)
>
>
>
> "We learn from history that we do not learn from history." -- George
>
> Hegel
>
> _______________________________________________
>
> applescript-users mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
> Do not post admin requests to the list. They will be ignored.
>
>
>
-------------
>
Ted Pearson, Jr.
>
Website: http://blu.host.sk/
>
Moderator at http://www.macfora.com/
>
AIM: PearsonTedJr
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.