Cookies and XMLLib.osax
Cookies and XMLLib.osax
- Subject: Cookies and XMLLib.osax
- From: Michael Ghilissen <email@hidden>
- Date: Sat, 17 Sep 2005 10:57:25 -0400
Hi,
I am trying the new XMLLib.osax 2.7 from Satimage to clean up my Safari Cookies.plist. I want to eliminate unwanted cookies and leave out a list of approved cookies. So far I can read and select the approved cookies, but I have some troubles to write a new plist, complete with the header. Can someone give me a help?
Thanks in advance.
Michael
set the_folder to ("Macintosh HD:Users:michael:Library:Cookies:") as text
set the_file to (the_folder & "Cookies.plist") as alias
set the_plist to PlistOpen the_file
--enter a list of acceptable cookies by <Domain>
set the_okookies to {".apple.com", "mail.google.com", ".msn.com", ".yahoo.com"}
try
repeat with i from 1 to 5 -- for a full loop, change to: PlistCount the_plist
set _node to PlistChild the_plist index i
set TheResult to PlistGet (PlistChild _node key "Domain")
if (PlistGet (PlistChild _node key "Domain")) is in the_okcookies then ¬
-- here I need help to write a new plist
-- with the selected information contained in (PlistGet _node)
end repeat
on error theErr
display dialog theErr
end try
PlistClose the_plist
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden