i wonder if it is possible to read data and links from cookies folder to web object ???
Professional Software Development Tools
i wonder if it is possible to read data and links from cookies folder to web object ???
Yes it is:
Look in the manual for TextFile.ReadToTable
or TextFile.ReadToString.
thanks for answer, is it possible to give a small example ???
If you can tell me where the cookies are i might help you. Im not into websites and cookies you know. Just help me started and i see what i can do.
well my cookies r here ;
but is it possible to find computer name(mine is Jack) automaticly ???Code:C:\Documents and Settings\Jack\Cookies
Yes thats possible to. Ill start right away and watch this topic in about 15-30 minutes. then it should be done i think.
but hey wait. There not only HTTP links init. there's a bunch of other info in there to. Just the links right?
no also users for the sites too...
Well this code gives you the windows username
The variable Windows_Username will contain in your case "Jack", but for another user it will contain their windows username.Code:MyMusicFolder = Shell.GetFolder(SHF_MYMUSIC); -- MyMmusicFolder will be C:\Documents and Settings\Your Windows Username\My Documents\My Music UserNameFind_Part1 = String.Replace(MyMusicFolder, "C:\\Documents and Settings\\", "", true); -- This will make UserNameFind_Part1: Your Windows Username\My Documents\My Music UserNameFind_Part2 = String.Find(UserNameFind_Part1, "\\", 1, true); -- This will search the next Slash in the string Your Windows Username\My Documents\My Music and return its position Windows_Username = String.Left(UserNameFind_Part1, UserNameFind_Part2-1); -- This will remove everything behind the windows user name in the string UserNameFind_Part1 and leaves you the windows username
Now, the path to your cookies folder can be created like this:
Then you can use TextFile.ReadToTable to load a cookie like this:Code:CookieFolder = "C:\\Documents and Settings\\"..Windows_Username.."\\Cookies"
CookieContentTable[1] will be containing line one of the cookieCode:CookieContentTable = TextFile.ReadToTable(CookieFolder.."\\CookieNameHere.txt");
CookieContentTable[2] will be containing line two of the cookie
etc....
You can use File.Find in the cookie folder to get al .txt files(cookies) and return them to a table.
Then you need to find a way to find URL's in the cookies by proparly using String.Find.
That should get you started. I wish i could create you a full working example but i can't because i dont know exactly how a cookie is created and how it's structured.
Hope this helps,
Teqskater.![]()
thanks alot Teqskater![]()
Be careful, this will not work on other languages of the operating system, nor will it work on Vista or on another future OS!
A better and OS and language independent way to find the cookie folder was already shown here.
Ulrich
Alright Ulrich, thanks for the tip. Im dutch and im using a dutch windows Xp and it still works for me.
Ok, I should have written that it might not work on different languages.
Your method definitely doesn't work on my system (XP as well), as I pointed the "My Music" folder to a proper folder on my F: partition, and the proposed method doesn't work at all on Windows Vista. Vista is two years old now, and we should already be writing compatible programs.
Ulrich