• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Considerable simplification should be possible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Considerable simplification should be possible
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Considerable simplification should be possible
  • Next by Date: Re: Considerable simplification should be possible
  • Previous by thread: Re: Considerable simplification should be possible
  • Next by thread: Re: Considerable simplification should be possible
  • Index(es):
    • Date
    • Thread