Re: Considerable simplification should be possible
Re: Considerable simplification should be possible
- Subject: Re: Considerable simplification should be possible
- From: G Wood <email@hidden>
- Date: Mon, 28 Apr 2014 23:50:11 -0400
On Monday, April 28, 2014 at 7:04 PM, Shane Stanley wrote:
if volumeChoice is not false then
set volumeChoice to item 1 of volumeChoice
repeat with i from 1 to count of namesArray
if item i of namesArray = volumeChoice then
set theID to item i of idArray
exit repeat
end if
end repeat
end if
do shell script "diskutil mount " & theID
Nice script, Shane. To prevent an error from “theID” not being defined if the user cancels the choose, I moved the “do shell script…” up into the “if volumeChoice is not false then…” chunk, so that’s it’s part of that logic test.
—
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden