29.10.08 29.10 19:02:11 diskarbitrationd daemon Error FastScripts [233]:36611 not responding.
set myVolumes to getSelectedVolumes()
if (count myVolumes) < 1 then return
set myImages to getImageList()
repeat with myVolume in myVolumes
set myImagePath to \"\"
set myImageFile to null
repeat with myImage in myImages
set mountPoint to |mount-point| of item 3 of |system-entities| of myImage
displayed name of myVolume
if mountPoint = (\"/Volumes/\" & displayed name of myVolume) then
set myImagePath to |image-path| of myImage
set myImageFile to POSIX file myImagePath
end if
end repeat
tell application \"Finder\"
eject myVolume
if myImageFile is not null then
try
delete file myImageFile
end try
end if
end tell
end repeat
on getSelectedVolumes()
set volumeList to {}
tell application \"Finder\"
set mySelection to selection
repeat with myItem in mySelection
set myItem to contents of myItem
-- log class of myItem
if kind of myItem is \"Volume\" then
set end of volumeList to myItem
end if
end repeat
end tell
return volumeList
end getSelectedVolumes
on getImageList()
set diskinfo to do shell script \"hdiutil info -plist\"
tell application \"System Events\"
set diskinfo to value of (make new property list item with properties {text:diskinfo})
set imageList to |images| of diskinfo
end tell
return imageList
end getImageList
It looks like you're new here. If you want to get involved, click one of these buttons!