Re: Eject image
Re: Eject image
- Subject: Re: Eject image
- From: Luther Fuller <email@hidden>
- Date: Thu, 28 Feb 2013 10:58:56 -0600
In order to use the data returned by hdiutil, you need to do this ...
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})
The variable InfoRecord is now an AppleScript record which you can read using AppleScript's common commands for records. … If only you knew the structure and names used in this variable.
Here is a handler I use to make a new plist file ...
on makeNewPlistFile(folderAlias, filename, initialRecord) try return ((folderAlias as text) & filename & ".plist") as alias -- the file already exists end try set newFileName to (folderAlias as text) & filename tell application "System Events" make new property list item with properties {kind:record, value:initialRecord} make new property list file with properties {contents:the result, name:newFileName} set newFileName to (path of the result) end tell return (newFileName as alias) end makeNewPlistFile --------------------------------------------------------------------
You will need to modify it to write a temporary file to the desktop. Open this file with Xcode to see the structure of the data in InfoRecord. InfoRecord contains more data than you will need.
|
_______________________________________________
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
References: | |
| >Eject image (From: Robert Poland <email@hidden>) |