Re: Considerable simplification should be possible
Re: Considerable simplification should be possible
- Subject: Re: Considerable simplification should be possible
- From: Lists <email@hidden>
- Date: Mon, 28 Apr 2014 15:12:36 -0700
First off, thanks to all of the responders to my questions. All the solutions are, for the most part, much better than my own attempts at it. Unfortunately I'm stuck by my own lack of AppleScript acumen. I had begun to explore the possibility of creating two lists last night (not posted), but after getting the two lists created I get stuck figuring out how to pass the volume identifier (from list 2) when the user chooses the volume name (from list 1).
For example, Shane's (and everyones) script returns two lists. namesArray and idArray. How do I get the script to know that by picking "Condor" from the first list, I want it to pass "disk3s2" to the mount command? I'm sure the answer is right in front of me, but I can't see it.
Thanks J
set namesArray to {} set idArray to {} set theText to do shell script "diskutil list -plist" tell application "System Events" set diskInfo to AllDisksAndPartitions of (get value of (make property list item with properties {text:theText})) end tell repeat with aDisk in diskInfo repeat with aPartition in Partitions of aDisk if |Content| of aPartition is "Apple_HFS" then set end of namesArray to VolumeName of aPartition set end of idArray to DeviceIdentifier of aPartition end if end repeat end repeat
|
_______________________________________________
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