• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ejecting An Image Disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Ejecting An Image Disk
      • From: Luther Fuller <email@hidden>
References: 
 >Ejecting An Image Disk (From: Luther Fuller <email@hidden>)

  • Prev by Date: Ejecting An Image Disk
  • Next by Date: Re: Ejecting An Image Disk
  • Previous by thread: Ejecting An Image Disk
  • Next by thread: Re: Ejecting An Image Disk
  • Index(es):
    • Date
    • Thread