--- unmount - mount partitions
set all to paragraphs of (do shell script "ls /Volumes")
set w to choose from list all with prompt "wich one?" cancel button name "or activate?" OK button name "go away" with multiple selections allowed
try
repeat with teil in w
do shell script "diskutil unmount `diskutil list | awk '/ " & teil & " / {print $NF}'`"
end repeat
end try
if w = false then --- if you press "or activate?"
set Part to display dialog "name it!" default answer " " buttons {"none", "this one"} default button 2
set this to text returned of Part
set butn to button returned of Part
if butn = "none" then error number -128 --- Cancel
if butn = "this one" then
try
repeat with wakeup in this
do shell script "diskutil mount `diskutil list | awk '/ " & this & " / {print $NF}'`"
end repeat
end try
end if
end if