Re: Ejecting An Image Disk
Re: Ejecting An Image Disk
- Subject: Re: Ejecting An Image Disk
- From: Luther Fuller <email@hidden>
- Date: Tue, 28 Oct 2008 14:53:16 -0500
On Oct 28, 2008, at 12:42 PM, Luther Fuller wrote:
set mountPoint to my getMountPoint(itemAlias)
But, I didn't include code for this handler.
If anyone wants to try duplicating the problem, you will need this ...
on getMountPoint(imageAlias)
try
set imagePath to (get POSIX path of imageAlias)
if last character of imagePath = "/" then set imagePath to text 1
thru -2 of imagePath
set AppleScript's text item delimiters to {imagePath}
set imageInfo to (do shell script "hdiutil info") -- returns info
for all mounted disk images
set imageInfo to (text item 3 of imageInfo)
set AppleScript's text item delimiters to {"/dev/"}
set imageInfo to (text item 2 of imageInfo)
set AppleScript's text item delimiters to {""}
return "/dev/" & (word 1 of imageInfo)
end try
return ""
end getMountPoint -----------------------
_______________________________________________
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