Re: How to choose a hard disk or volume?
Re: How to choose a hard disk or volume?
- Subject: Re: How to choose a hard disk or volume?
- From: "Marc K. Myers" <email@hidden>
- Date: Fri, 15 Dec 2000 00:36:29 -0500
- Organization: [very little]
Gary Hobish wrote:
>
Date: Wed, 13 Dec 2000 18:37:30 -0800
>
From: Gary Hobish <email@hidden>
>
Subject: How to choose a hard disk or volume?
>
To: email@hidden
>
>
I want the user to choose a volume within a script. I have tried:
>
>
set localDisk to (choose disk with prompt "Choose your startup disk.")
>
>
but I get an error when checking syntax on the word "disk" which says
>
"Expected "," but found identifier."
>
>
I tried the same thing with the word "volume" replacing "disk" but got the
>
same error.
>
>
Any ideas?
>
>
Also, how would I go about telling a system to restart from a script?
"choose folder" will allow you to select folders or volumes. There is
no "choose disk". You can filter out folders this way:
repeat
set theDisk to (choose folder with prompt "Pick a volume:")
tell application "Finder"
set theKind to the kind of theDisk
set theName to the name of theDisk
end tell
if theKind is "disk" then
exit repeat
else
display dialog theName & " is not a disk"
end if
end repeat
To restart from a script:
tell application "Finder" to restart
Marc [12/15/00 12:35:39 AM]