(no subject)
(no subject)
- Subject: (no subject)
- From: Oakley Masten <email@hidden>
- Date: Wed, 15 Apr 2009 09:18:04 -0700 (PDT)
On Date: Wed, 15 Apr 2009 09:51:53 +0200
Alexis Gottlieb <email@hidden> Wrote
On Subject: Re: Copy to list Question
Hi,
You can handle dictionaries (ie, associative arrays whose keys are
strings) by using the plist commands of the free scripting addition
XMLLib.osax (from Satimage-software):
set p to PlistNew
PlistSet p key "var1" to "Cat"
PlistSet p key "var2" to "Dog"
PlistSet p key "var3" to "Horse"
PlistSet p key "var4" to "Bird"
set ListAnimals to {}
repeat with x from 1 to 4
copy (PlistGet p key ("var" & x)) to end of
ListAnimals
end repeat
ListAnimals
--or:
set ListAnimals to PlistGet p key (PlistGetKeys p)
PlistClose p--free memory: p is not valid any more
XMLLib.osax is available at: http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html
Best regards,
Alexis
Alexis
I have downloaded the OSAX and am trying to run the plist tutorial
Small problem: My computer - MacBookPro Intel - 10.4.11 does not have the requested
plist
"AddressBookMe.plist"
It has "com.apple.AddressBook.plist" but that doesn't appear to be the correct item.
any Thoughts?
Thanks
Oakley
_______________________________________________
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