sebasun Posted April 26, 2007 Posted April 26, 2007 I would like to read a session cookie from Internet Explorer. Some Delphi developer told me that it can be obtained from the webbrowser.document.Cookie object. Does anyone knows how to get it in Autoit ? Thank you !
DaleHohm Posted April 26, 2007 Posted April 26, 2007 Using IE.au3 #include <IE.au3> $oIE = _IECreate("some-url") $sCookie = $oIE.document.cookie Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
sebasun Posted April 26, 2007 Author Posted April 26, 2007 Thank you very much for your prompt reply. As I would like to obtain the value of a session cookie, how can I do the same thing with _IEAttach ?
DaleHohm Posted April 26, 2007 Posted April 26, 2007 Thank you very much for your prompt reply. As I would like to obtain the value of a session cookie, how can I do the same thing with _IEAttach ?If you're familiar with _IEAttach, it will be pretty obvious I think #include <IE.au3> $oIE = _IEAttach("document-title") $sCookie = $oIE.document.cookie Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
sebasun Posted April 27, 2007 Author Posted April 27, 2007 Thanks ! I have tried it before but there is an error : "Error: Variable must be of type Object" with a "^" at $oIE.document.cookie
DaleHohm Posted April 27, 2007 Posted April 27, 2007 Please insure you run your code from SciTe as IE.au3 goes to great lengths to try to display helpful diagnostics. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
sebasun Posted April 30, 2007 Author Posted April 30, 2007 Thank you very much ! SciTE showed the error codes.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now