| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On 2007-08-29, at 05:50:06, Wayne Melrose wrote:
You won't be doing much with a document like the above. That's because the value for the key "happy" should be <false/>. And (minor point not terribly important) the document is not ordered the same as Property List Editor would order it. The suite you want to use is the Property List Suite because the document type is 'plist'. Property Lists are only superficially XML. That's why there's a separate suite for them in AppleScript and separate APIs for them internally in both Carbon and Cocoa. set f to "~/Desktop/some.plist" set res to {} tell application "System Events" set plif to property list file f set pitm to every property list item of plif repeat with p in pitm set end of res to {name, value} of p end repeat end tell res You can also use the 'defaults' tool in a 'do shell script'. Unless the plist file is located in ~/Library/Preferences, the path must be a full path without the ".plist" extension. % defaults read ~/Desktop/some creation Philip Aker email@hidden |
_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
| References: | |
| >XML - System Events vs XMLlib (From: Wayne Melrose <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.