on run
set imageInfo to (do shell script "hdiutil info -plist ")
tell application "System Events" to set InfoRecord to value of (make property list item with properties {text:imageInfo})
--
set mountPointList to {}
set imagesList to images of InfoRecord
repeat with imageItem in imagesList
set entitiesList to |system-entities| of imageItem
repeat with entityItem in entitiesList
try
|mount-point| of entityItem
set mountPoint to (POSIX file the result) as alias
set mountPointList to mountPointList & {mountPoint}
exit repeat
end try
end repeat
end repeat
if (count items of mountPointList) > 0 then
tell application "Finder" to eject mountPointList
end if
--
beep
delay 1
end run