Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    22

    Delete specific cookie

    My question is pretty simple but I don't know how to script it, I'm pretty new to this.

    So what I would like to do is when you press the exit button, it searches for a specific cookie that was created by a site visited with the web plugin(so IE cookie) and deletes it.

    Any help is greately appreciated!

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Code:
    local cFolder = Shell.GetFolder(SHF_MYDOCUMENTS); -- this is c:\documents and settings\username\my documents.
    cFolder = cFolder.."\\..\\cookies\\" -- now we're pointing at the cookies folder
    local cFile = cFolder .. "MyCookie[1].txt";
    File.Delete( cFile )
    Last edited by jassing; 03-11-2010 at 10:48 AM. Reason: removed double [CODE] tags.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  3. #3
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    22
    But this only works for xp right? since vista and seven store it in the roaming folder.. isn't there a command that automaticly finds the cookie folder no matter what os you are on? eg. %ProgramFilesFolder%

  4. #4
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    correct - you would need to craft it.
    You could use File.Find() to look for hte cookie since you know what it is.

    There is no var, nor do I think should be.
    Opera, Mozilla, Firefox, Chrome,IE, etc dont' store their cookies in the same folder.

    it's not that hard to do a little if/then/else to to work for various os's.
    That would be better than file.find() but if you're lazy; file.find() would work; just start in the same users base folder .. which is available via api's.
    Last edited by jassing; 03-11-2010 at 11:04 AM.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

Posting Permissions

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