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
set volumeChoice to (choose from list namesArray with prompt "Choose a volume to mount.")
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