anyday Posted March 17, 2006 Share Posted March 17, 2006 Here is my code: #include <ie.au3> $oIE = _IECreate() _IENavigate($oIE, "website") $o_form = _IEFormGetObjByName($oIE, "form") $o_login = _IEFormElementGetObjByName($o_form, "username") $o_password = _IEFormElementGetObjByName($o_form, "password") _IEFormElementSetValue($o_login, "username") _IEFormElementSetValue($o_password, "pass") _IEFormSubmit($o_form) _IELoadWait($oIE) _IENavigate($oIE, "newwebsite") Exit the newwebsite does point to a url. i dont get any errors. the page just never loads, it never attempts to load the "newwebsite" url? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted March 17, 2006 Moderators Share Posted March 17, 2006 (edited) the newwebsite does point to a url. i dont get any errors. the page just never loads, it never attempts to load the "newwebsite" url?See what you get with this. Don't forget to change the websites back. #include <ie.au3> $oIE = _IECreate() _IENavigate($oIE, "website") $o_form = _IEFormGetObjByName($oIE, "form") $o_login = _IEFormElementGetObjByName($o_form, "username") $o_password = _IEFormElementGetObjByName($o_form, "password") _IEFormElementSetValue($o_login, "username") _IEFormElementSetValue($o_password, "pass") _IEFormSubmit($o_form) ;_IELoadWait($oIE) MsgBox(0, "", "Click OK when the first page is finished loading.") _IENavigate($oIE, "newwebsite") Edited March 17, 2006 by big_daddy Link to comment Share on other sites More sharing options...
anyday Posted March 17, 2006 Author Share Posted March 17, 2006 #include <ie.au3> $oIE = _IECreate() _IENavigate($oIE, "website") $o_form = _IEFormGetObjByName($oIE, "form") $o_login = _IEFormElementGetObjByName($o_form, "username") $o_password = _IEFormElementGetObjByName($o_form, "password") _IEFormElementSetValue($o_login, "username") _IEFormElementSetValue($o_password, "pass") _IEFormSubmit($o_form) _IELoadWait($oIE) Sleep ( 3000 ) _IENavigate($oIE, "newwebsite") Exit I added the sleep command and it works now, i dunno what was wrong Link to comment Share on other sites More sharing options...
DaleHohm Posted March 17, 2006 Share Posted March 17, 2006 This is really a puzzlement. This issue used to almost never occur and I could never reproduce it. Recently is is being reported over and over. There is test code posted in one of the last few replies of the IE.au3 thread that is designed to fix this and I would appreciate if you would test and report the results (without the Sleep command). If it works for you I'll get a new version out with the modified code as quickly as I can. thanks, 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...
anyday Posted March 17, 2006 Author Share Posted March 17, 2006 no i dont mind at all trying it out, but im not good with forums i cant seem to find the post your talking about getting the code from. if you can post the code here ill try it for you. Link to comment Share on other sites More sharing options...
DaleHohm Posted March 17, 2006 Share Posted March 17, 2006 no i dont mind at all trying it out, but im not good with forums i cant seem to find the post your talking about getting the code from.if you can post the code here ill try it for you.Sure... it's here -- and there's been enough traffic there recently that it isn't one of the last posts anymore 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...
anyday Posted March 18, 2006 Author Share Posted March 18, 2006 dale, i updated the ie.au3 with the code you linked to... but the script i have still only works with the wait command in there. Just thought i would report back to you and let you know. Thanks, Link to comment Share on other sites More sharing options...
anyday Posted March 18, 2006 Author Share Posted March 18, 2006 well here my script so far, could you tell me what im doing wrong? #include <ie.au3> $oIE = _IECreate() _IENavigate($oIE, "website here") $o_form = _IEFormGetObjByName($oIE, "form") $o_login = _IEFormElementGetObjByName($o_form, "username") $o_password = _IEFormElementGetObjByName($o_form, "password") _IEFormElementSetValue($o_login, "username") _IEFormElementSetValue($o_password, "pass") _IEFormSubmit($o_form) _IELoadWait($oIE) Sleep (3000) _IENavigate($oIE, "newwebsitehere") _IELoadWait($oIE) $o_form2 = _IEFormGetObjByName($oIE, "SearchForm") $o_days = _IEFormElementGetObjByName($o_form2, "history") $oButton = _IEFormElementGetObjByName($o_form2, "Submit") _IEFormElementSetValue ($o_days, "today-5") $oButton.focus() Send("{Enter}") _IELoadWait($oIE) Exit Everything works till it gets to the $oButton.focus() Then i get this error $oButton.focus() $oButton^ERROR Error: Variable must be of type "Object". Thanks for any help. Link to comment Share on other sites More sharing options...
DaleHohm Posted March 19, 2006 Share Posted March 19, 2006 So now you have a problem with the $o_button object - it isn't one. You need to check the return value of the _IExxx calls to see where to focus your efforts. Study your Submit button. 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...
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