Re: Scripting Startup Disk?
Re: Scripting Startup Disk?
- Subject: Re: Scripting Startup Disk?
- From: David Simerly <email@hidden>
- Date: Thu, 27 Sep 2001 10:38:32 -0700
- Url: http://www.digital-native.com
on 9/27/01 6:46 AM, Todd J McDaniel at email@hidden wrote:
>
I've gotten it to complile on a 9.1 box, but it always crashes a 9.2.1 box.
>
Anyone doing anything with it these days?
Here's one I wrote to toggle my boot disks. I'm not spending much time in 9
any more, but it worked the last time I used it in 9.2.1.
on run
tell application "Startup Disk"
activate
set my_startup to startup disk alias
set my_startup to my_startup as text
if my_startup = "Europa:" then
set my_startup to "Ganymede:"
else
set my_startup to "Europa:"
end if
set startup disk alias to alias my_startup
quit
end tell
tell application "Finder"
activate
set usr_choice to button returned of ,
(display dialog "The startup disk as been set to, 3" &
my_startup & "2" & return & return & "Restart now?" buttons {"No", "Yes"}
default button 2 with icon 1)
if usr_choice = "Yes" then restart
end tell
end run
HTH.
DS
______________________________________
Digital Native
Your guide through the virtual jungle.
______________________________________
"Courage is resistance to fear, mastery of fear -- not absence of fear."
-- Mark Twain