• 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: Eject image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eject image


  • Subject: Re: Eject image
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 28 Feb 2013 10:40:19 -0600

On Feb 28, 2013, at 10:15 AM, Robert Poland wrote:

I'm trying to create a script that will close a disk image if it exists.

I just looked at some old scripting that I used some time ago. Most of it would just confuse the issue, but I did notice my use of 'hdiutil' and  I think your problem is easily solvable.

First, read the man page for 'hdiutil'.
Second, with one image disk mounted, run this ...

do shell script "hdiutil info -plist"

The result will appear in the console as xml (because of -plist).

Do not even think of digging data out of xml text. Write the data to a .plist file and open it with Xcode to see the structure of the file. Once you understand the structure you can get what you need directly from the data via System Events commands.

There's more to say about this, but I need to look at more scripts. I will continue later.



 _______________________________________________
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: Eject image
      • From: James Roberts <email@hidden>
References: 
 >Eject image (From: Robert Poland <email@hidden>)

  • Prev by Date: Eject image
  • Next by Date: Re: Eject image
  • Previous by thread: Eject image
  • Next by thread: Re: Eject image
  • Index(es):
    • Date
    • Thread