DjDeep00 Posted September 1, 2006 Share Posted September 1, 2006 The following code opens up two ie windows. If you login to yahoo in one of the windows, the other window becomes same as the window u logged in as. Basically if you click "Login" in window 1 and successfully log in "Joe", then if you click "Login" on window 2, you will see Joe's email. Not sure if I have to use _ieattach or its a cookie thing. Please advise. Sample Code: $Total=2 Dim $oIE[$Total] For $x=0 to $Total-1 $oIE[$x] = _IECreate("www.yahoo.com") Next Link to comment Share on other sites More sharing options...
DaleHohm Posted September 1, 2006 Share Posted September 1, 2006 It's a cookie thing. 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 Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 1, 2006 Author Share Posted September 1, 2006 It's a cookie thing.DaleDamn cookies. You think, there is another way? I mean if I manually open two internet explorer windows then I have no problem. I just doesnt work with the script. Link to comment Share on other sites More sharing options...
rbhkamal Posted September 1, 2006 Share Posted September 1, 2006 I also ran into similar issue; a work around is to disable the cookies (If you can). The webpage should be designed in a way that prevents this frorm happening. "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 1, 2006 Author Share Posted September 1, 2006 I also ran into similar issue; a work around is to disable the cookies (If you can).The webpage should be designed in a way that prevents this frorm happening.Ok. So how come I dont run into the "cookie problem" by manually opening two internet explorer browser and do what I gotta do. How come the script is differnet? Sorry I am bit confused. Link to comment Share on other sites More sharing options...
rbhkamal Posted September 1, 2006 Share Posted September 1, 2006 Ok. So how come I dont run into the "cookie problem" by manually opening two internet explorer browser and do what I gotta do. How come the script is differnet? Sorry I am bit confused. It depends on what actions you do while the two web windows are open.Trust me, if you disable the cookies you will never see this issue again.Do this test:1- Open yahoo then login.2- View your inbox then copy the link3- from the start menu open RUN and paste the link then click OKNow you have two windows open and they are both logged in to your inbox!4- on one of the pages click logout then close the window.Now you will see that the other page was logged out too.If that happend this means that Yahoo is sharing the cookies .RK "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 5, 2006 Author Share Posted September 5, 2006 It depends on what actions you do while the two web windows are open.Trust me, if you disable the cookies you will never see this issue again.Do this test:1- Open yahoo then login.2- View your inbox then copy the link3- from the start menu open RUN and paste the link then click OKNow you have two windows open and they are both logged in to your inbox!4- on one of the pages click logout then close the window.Now you will see that the other page was logged out too.If that happend this means that Yahoo is sharing the cookies .RKHow should I go bout disabling the cookies? I tried with IE settings but then Yahoo wont log me in. Is there a way delete a cookie after its created for one ie browser? Link to comment Share on other sites More sharing options...
rbhkamal Posted September 6, 2006 Share Posted September 6, 2006 (edited) How should I go bout disabling the cookies? I tried with IE settings but then Yahoo wont log me in. Is there a way delete a cookie after its created for one ie browser?I have no idea.I was wondering if there is a COM method that forces the web cookies for a specific window to be stored in a specific path.If I were you I would Google this up and see what other people did to prevent this "cookies sharing".RK Edited September 6, 2006 by rbhkamal "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
AceLoc Posted September 6, 2006 Share Posted September 6, 2006 (edited) do they got the same URL? else you probably could use _IEQuit($oIE, "URL TO THE COOKIE") Edited September 6, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
liquidzyklon Posted September 11, 2006 Share Posted September 11, 2006 (edited) [edit: ignore my post, I just noticed that I didn't read the post clearly. sorry] I think this is what the OP was referring to. I'll try and outline the instructions on how to do this. 1) Close all your IE browser windows. 2) Open one IE window by double-clicking IE icon. 3) Goto your e-mail website and login. Now do not log out, but go to another website like google.com. 4) Press "Ctrl + n" to create a new window of IE [NOTE: this new window of IE is still the same session as the previous window]. 5) Now go back to your e-mail website with the new window. Voila you are still logged in. 6) Now minimize all IE windows, start another session of IE by double-clicking the IE icon. 7) Goto the same e-mail website with the new session window, it will ask you to login again! What I think AutoIt does with _IECreate is that it launches a new session of IE everytime so the cookie isn't carried over so your new IE window won't show you the e-mail address. This is my speculation because I cannot confirm this on a Windows 98 machine (no taskmanager). I am also curious about the same question since I have a similar issue here. Is there a workaround? Edited September 11, 2006 by liquidzyklon Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 11, 2006 Author Share Posted September 11, 2006 [edit: ignore my post, I just noticed that I didn't read the post clearly. sorry] I think this is what the OP was referring to. I'll try and outline the instructions on how to do this. 1) Close all your IE browser windows. 2) Open one IE window by double-clicking IE icon. 3) Goto your e-mail website and login. Now do not log out, but go to another website like google.com. 4) Press "Ctrl + n" to create a new window of IE [NOTE: this new window of IE is still the same session as the previous window]. 5) Now go back to your e-mail website with the new window. Voila you are still logged in. 6) Now minimize all IE windows, start another session of IE by double-clicking the IE icon. 7) Goto the same e-mail website with the new session window, it will ask you to login again! What I think AutoIt does with _IECreate is that it launches a new session of IE everytime so the cookie isn't carried over so your new IE window won't show you the e-mail address. This is my speculation because I cannot confirm this on a Windows 98 machine (no taskmanager). I am also curious about the same question since I have a similar issue here. Is there a workaround? If the only problem is with _IECreate() then I dont mind running IExplore.exe (same thing as double-clicking IE icon) and then somehow use _IENavigate and other IE UDFs to control the IE windows. Not sure if this is possible. Did anyone try this? Link to comment Share on other sites More sharing options...
DjDeep00 Posted October 12, 2006 Author Share Posted October 12, 2006 If the only problem is with _IECreate() then I dont mind running IExplore.exe (same thing as double-clicking IE icon) and then somehow use _IENavigate and other IE UDFs to control the IE windows. Not sure if this is possible. Did anyone try this?Is it possible? Please help. Link to comment Share on other sites More sharing options...
AzKay Posted October 12, 2006 Share Posted October 12, 2006 You cant use deleting cookies, or blocking them, because the cookie is what tells the site that your logged in, if you delete it, it wont see you as logged in, so you wont be logged in. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
DjDeep00 Posted October 16, 2006 Author Share Posted October 16, 2006 You cant use deleting cookies, or blocking them, because the cookie is what tells the site that your logged in, if you delete it, it wont see you as logged in, so you wont be logged in.100% correct. I agree with you. So is there any other way? Maybe somehow replicate the way you would open multiple ie windows manualy and navigate those pages? Maybe using IE UDFs? Please advise. Link to comment Share on other sites More sharing options...
DjDeep00 Posted November 16, 2006 Author Share Posted November 16, 2006 Can anyone help me with this? Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 16, 2006 Share Posted November 16, 2006 (edited) I'm not sure I quite know what you mean, but it sounds like you want to create an IE session with yahoo, and then have a second window within the same IE session. Here's something that might work for you (this one deals with 2 Google windows, but the principles are the same):#include <IE.au3> $url = "www.google.com" $oIE = _IECreate($url, 1) $title = "Google - Microsoft Internet Explorer" ControlSend($title, "", "ToolbarWindow324", "{ALTDOWN}") sleep(10) ControlSend($title, "", "ToolbarWindow324", "f") sleep(10) ControlSend($title, "", "ToolbarWindow324", "{ALTUP}") sleep(10) ControlSend($title, "", "ToolbarWindow324", "{ENTER}") sleep(10) ControlSend($title, "", "ToolbarWindow324", "{ENTER}") sleep(1000) $newtitle = "Google2 - Microsoft Internet Explorer" WinSetTitle($title, "", $newtitle) sleep(1000) $handle = WinGetHandle($newtitle) $oIE2 = _IEAttach($handle, "HWND")You can get the second window into an IE object variable by first changing the title to make it different from the first one, grabbing the handle, and then using IEAttach. Dunno if that's what you wanted or not.Edit: By the way, what's the shorter key command for send Alt+F? Edited November 16, 2006 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
DaleHohm Posted November 16, 2006 Share Posted November 16, 2006 Can anyone help me with this?There are two types of cookies: persistant and per-session. Persistant cookies are stored in files on disk and are shared by all browser instances. Per-session cookies are stored in memory but they end up being shared by all browsers running in the same IEXPLORE.EXE instance, but not accross them.If your cookies are per-session cookies, getting unique IEPLORE.EXE processes should allow you to do what you want. You can change the options for Internet Explorer to start each browser in a seperate process.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 Link to comment Share on other sites More sharing options...
Teldin Posted March 22, 2007 Share Posted March 22, 2007 Dale, how would you go about opening a hidden IE window whose unique ID is the same as the "logged in" window? Link to comment Share on other sites More sharing options...
DaleHohm Posted March 22, 2007 Share Posted March 22, 2007 Not sure what this means: "whose unique ID is the same as the "logged in" window?" 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 Link to comment Share on other sites More sharing options...
Teldin Posted March 23, 2007 Share Posted March 23, 2007 You guys were talking about cookies, IE Windows, and authentication ("logged in"). If one IE window session is authenticated with yahoo with a per-session cookie, how can _IECreate or _IEAttach attach to that specific session? Link to comment Share on other sites More sharing options...
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