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: Axel Luttgens <email@hidden>
- Date: Thu, 1 Apr 2010 10:26:10 +0200
Le 1 avr. 2010 à 02:46:42, Shane Stanley a écrit :
> On 1/4/10 11:42 AM, "Luther Fuller" <email@hidden> wrote:
>
>> I still suspect that System Events does not know a property list file from a
>> trash icon.
>
> It knows them and can read and modify them; it just can't seem to create
> them.
Hello Shane,
Well, this already has discussed on the list; see for example:
http://lists.apple.com/archives/applescript-users/2008/Jan/msg00396.html
Assuming one wants to create a plist with an array of numbers, here's a sample incantation:
tell application "System Events"
set PLItem to make new property list item with properties {value:{1, 2, 3}}
set PLFile to make new property list file with properties {name:"~/Desktop/test.plist", contents:PLItem}
end tell
The ability for System Events to create property list files came with Leopard.
HTH,
Axel
_______________________________________________
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