burger Posted November 16, 2006 Share Posted November 16, 2006 I cannot get the following code to produce the login text. Any ideas would be appreciated. #include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "http://www.investnbest.com/members/Inside_InTouch5.htm") WinActivate("Connect to www.investnbest.com", "") ControlSetText("Connect to www.investnbest.com", "", 1005, "username") ControlSetText("Connect to www.investnbest.com", "", 1006, "password") Link to comment Share on other sites More sharing options...
Blue_Drache Posted November 16, 2006 Share Posted November 16, 2006 I cannot get the following code to produce the login text. Any ideas would be appreciated. #include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "http://www.investnbest.com/members/Inside_InTouch5.htm") WinActivate("Connect to www.investnbest.com", "") ControlSetText("Connect to www.investnbest.com", "", 1005, "username") ControlSetText("Connect to www.investnbest.com", "", 1006, "password") Investment site? For a 3rd party program inputting sensitive information? Danger Will Robinson!! Danger!!! Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 16, 2006 Share Posted November 16, 2006 did you ever think to look a lil more into the IE.au3 , maybe at _IEGetObjByName and _IEFormGetObjByName and _IEFormSetValue and _IEFormSubmit Link to comment Share on other sites More sharing options...
burger Posted November 16, 2006 Author Share Posted November 16, 2006 Thanks but I think I'm almost there. The script pauses until I open another browser window with a new URL. Once the new URL loads, my script continues and fills in the text. Something is causing it to pause and I think it is IENavigate or IECreate. Link to comment Share on other sites More sharing options...
burger Posted November 16, 2006 Author Share Posted November 16, 2006 I got to work. Here's the code in case it can help others. Rather than navigate to the protected page, used the mouse to click on the link. This got rid of the pause that occured with IENavigate. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Purposeful Investing in the Stock Market - Windows Internet Explorer","") If Not WinActive("Purposeful Investing in the Stock Market - Windows Internet Explorer","") Then WinActivate("Purposeful Investing in the Stock Market - Windows Internet Explorer","") WinWaitActive("Purposeful Investing in the Stock Market - Windows Internet Explorer","") MouseMove(195,417) MouseDown("left") MouseUp("left") WinWait("Connect to www.investnbest.com","") ControlSetText("Connect to www.investnbest.com", "", "Edit2", "username") ControlSetText("Connect to www.investnbest.com", "", "Edit3", "password") Link to comment Share on other sites More sharing options...
mikehunt114 Posted November 16, 2006 Share Posted November 16, 2006 #include <IE.au3> $url = "www.investnbest.com/members/Inside_Touch5.htm" $oIE = _IECreate($url, 1, 1, 0) sleep(2000) $title = "Enter Network Password" $text = "Please type your user name and password." WinWaitActive($title) $username = "Joe Blow" $password = "password" ControlSend($title, $text, "Edit1", $username) sleep(50) ControlSend($title, $text, "Edit2", $password) The page never actually completes loading, it waits for you to enter your username and password first. So your script was hung up at the IENavigate. Telling the script NOT to wait for the page to load, and using a sleep instead, cured the problem. 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...
burger Posted November 16, 2006 Author Share Posted November 16, 2006 Thank you very much MikeHunt. I thought that was the issue but I did not know it was possible to tell IECreate not to wait for the page to load. 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