Jump to content

Recommended Posts

Posted

Hi All,

I'm trying to write a small program that automatically logs on to a website using a username and password provided and screenshots the front page (I've checked and this is not against the site's rules).

I have the script working using _IECreateEmbedded(), however for some reason the user stays logged in on the website even after I restart my machine. I will be creating a way to actually sign out of the website as well, however to me this implies that some where cookies/sessions are being stored which I do not wish to happed. So is there any way I can flush the cookies/sessions created by the IE instance or something?

Thanks in advance

Posted

Hi,

Maybe this :

$oIE = _IECreateEmbedded( ...

;dostuff

$oIE.document.cookie = "" ;clear the cookies
Br, FireFox.
Posted

Hi FireFox. Thank you for your answer but unfortunately I've had no luck - I'm still signed in when I restart the script, even if I put it after the object is created, and at the end of the script. :/

Posted

A thought - Try to change the expiration date of each cookie you want to delete to now.

I am not in control of the cookies unfortunately - unless you can do this from within AutoIt, in which case I don't know how.

Posted (edited)

Is there any way that I could output the contents of the $oIE object so that I can check what cookies are actually stored in there because I've tried setting all the cookie names I can think of to 0 and I am still signed in. Unfortunately when I tried just making $oIE.document = "" I received an error saying that the requested action had failed. I just don't understand because surely the variable is overwritten every time the the script starts anyway and so the contents would be discarded!?

Also I can't see that it has much to do with the actual browser because I've just checked on both Internet Explorer and Internet Explorer 64-bit and I'm not signed into the website on either of them.

Edited by meisandy
Posted

I'm kind of coming to the conclusion that there is no actual answer to my problem.

Fortunately I no longer require this piece of code but if anyone can figure it out, I'd still like to mark the topic as solved :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...