Re: Property lists and System Events (was: no subject)
Re: Property lists and System Events (was: no subject)
- Subject: Re: Property lists and System Events (was: no subject)
- From: Luther Fuller <email@hidden>
- Date: Wed, 31 Mar 2010 19:42:48 -0500
On Mar 31, 2010, at 7:33 PM, hd wrote: On 1 Apr 2010, at 00:59, Luther Fuller wrote: I'm now confused, but suspect that System Events does not know what a property list file is.
On my 10.6.3 (and I suspect much earlier) it does if you feed it a POSIX path. To illustrate, try this on an existing plist file:
set plist_path to POSIX path of (choose file of type "plist") tell application "System Events" tell property list file plist_path to get text of contents end tell
This returns the XML.
"get value of contents" returns the plist as a record.
Text and value are editable, according to the System Events dictionary. Not sure how to: this by Ben Waldie is old but may help:
Many systems ago, I recall having to use posix path with System Events. Currently, in 10.5 and after, an alias as text seems to work. In the code I posted earlier, I had also tried using: an alias; a posix path; and a quoted posix path. None of these worked. I still suspect that System Events does not know a property list file from a trash icon.
|
_______________________________________________
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