Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534

    is it possible to read from cookies folder ???

    i wonder if it is possible to read data and links from cookies folder to web object ???

  2. #2
    Join Date
    Apr 2007
    Posts
    165

    Yes

    Yes it is:
    Look in the manual for TextFile.ReadToTable
    or TextFile.ReadToString.

  3. #3
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    thanks for answer, is it possible to give a small example ???

  4. #4
    Join Date
    Apr 2007
    Posts
    165
    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.

  5. #5
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    well my cookies r here ;
    Code:
    C:\Documents and Settings\Jack\Cookies
    but is it possible to find computer name(mine is Jack) automaticly ???

  6. #6
    Join Date
    Apr 2007
    Posts
    165
    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?

  7. #7
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    no also users for the sites too...

  8. #8
    Join Date
    Apr 2007
    Posts
    165
    Well this code gives you the 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
    The variable Windows_Username will contain in your case "Jack", but for another user it will contain their windows username.

    Now, the path to your cookies folder can be created like this:
    Code:
    CookieFolder = "C:\\Documents and Settings\\"..Windows_Username.."\\Cookies"
    Then you can use TextFile.ReadToTable to load a cookie like this:
    Code:
    CookieContentTable = TextFile.ReadToTable(CookieFolder.."\\CookieNameHere.txt");
    CookieContentTable[1] will be containing line one of the cookie
    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.

  9. #9
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534
    thanks alot Teqskater

  10. #10
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    Quote Originally Posted by Teqskater View Post
    (...)
    Now, the path to your cookies folder can be created like this:
    Code:
    CookieFolder = "C:\\Documents and Settings\\"..Windows_Username.."\\Cookies"
    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

  11. #11
    Join Date
    Apr 2007
    Posts
    165
    Alright Ulrich, thanks for the tip. Im dutch and im using a dutch windows Xp and it still works for me.

  12. #12
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    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

Similar Threads

  1. How can I locate Internet Explorer's favorites folder
    By Adam in forum Setup Factory 8.0 FAQ
    Replies: 0
    Last Post: 04-28-2008, 11:18 AM
  2. read from folder and write it to menubar
    By GoOgLe in forum AutoPlay Media Studio 7.5
    Replies: 24
    Last Post: 03-22-2008, 03:41 PM
  3. INFO: The Explore Button on the Distribution Folder Dialog
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-11-2002, 12:06 PM
  4. HOWTO: Locate Internet Explorer's Favorites Folder
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-11-2002, 09:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts