boobo Posted December 20, 2012 Share Posted December 20, 2012 (edited) My script:#include <IE.au3>$oIE = _IECreate ("http://zakupki.gov.ru/wps/portal/base/topmain/home")$oForms = _IEFormGetCollection ($oIE)MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")For $oForm In $oForms MsgBox(0, "Form Info", $oForm.name)Next Error:Line 560 ("File "File "С:... IE.au3""")WEnd Wend ERRORWhat to do??? Edited December 20, 2012 by boobo Link to comment Share on other sites More sharing options...
PhoenixXL Posted December 20, 2012 Share Posted December 20, 2012 (edited) try downloading the latest version of Autoit again seems as if somewhat wrong editing has been done with the IE UDF Edited December 20, 2012 by PhoenixXL My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
boobo Posted December 20, 2012 Author Share Posted December 20, 2012 try downloading the latest version of Autoit againseems as if somewhat wrong editing has been done with the IE UDFdoesnt help((( Link to comment Share on other sites More sharing options...
JohnOne Posted December 20, 2012 Share Posted December 20, 2012 Then I suspect that it not your whole script. There is nothing wrong with that code, or IE.au3. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
boobo Posted December 20, 2012 Author Share Posted December 20, 2012 I find something new. My new script: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include <IE.au3> $oIE = _IECreate ("http://www.yandex.ru/") $oForm = _IEFormGetCollection($oIE,0) $oLogin = _IEFormElementGetObjByName($oForm,"text") _IEFormElementSetValue($oLogin,"форма0") _IEFormSubmit($oForm) And I have the same error. But when I change "_IEFormSubmit($oForm,0)". I have not error. So I think that it is connected with waiting for page to load. Can you help me??? Help me, please!!! Link to comment Share on other sites More sharing options...
JohnOne Posted December 20, 2012 Share Posted December 20, 2012 Look at _IEErrorHandlerRegister and do some debugging. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
boobo Posted December 20, 2012 Author Share Posted December 20, 2012 Look at _IEErrorHandlerRegisterand do some debugging.What does it mean??? Can you describe? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 20, 2012 Moderators Share Posted December 20, 2012 Did you read the section under _IEErrorHandlerRegister, like JohnOne suggested? Judging from the short time between his post and yours, I am guessing you did not. I would suggest reading the section thoroughly, then trying something on your own, and posting your code if you run into trouble. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
DaleHohm Posted December 20, 2012 Share Posted December 20, 2012 There is, in fact, an issue with IE.au3 where this WEND error can occur with _IELoadWait. It is a timing issue and something has changed in recent IE versions that causes it to occur when it did not in earlier versions. THis issue is addressed through a redesign in the new alpha/beta version of AutoIt and the IE.au3 that ships with it. Also, note the comment in the Remarks for _IEFormSubmit: If you experience trouble with the automatic _IELoadWait called by default, please set $f_wait parameter to 0 and call _IELoadWait from your script, passing it the InternetExplorer object. 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...
boobo Posted December 21, 2012 Author Share Posted December 21, 2012 My script: #include <IE.au3> ;_IEFormSubmit($oForm,0) ;_IELoadWait ($oIE) ; Register a customer error handler _IEErrorHandlerRegister ("MyErrFunc") $oIE = _IECreate ("http://zakupki.gov.ru/pgz/public/action/search/extended/init",0,1,0,-1) $oForm = _IEFormGetCollection($oIE,0) $oLogin = _IEFormElementGetObjByName($oForm,"d") _IEFormElementSetValue($oLogin,"пожар") ; Do something ; Deregister the customer error handler _IEErrorHandlerDeregister () ; Do something else ; Register the default IE.au3 COM Error Handler _IEErrorHandlerRegister () ; Do more work Exit Func MyErrFunc() ; Important: the error object variable MUST be named $oIEErrorHandler $ErrorScriptline = $oIEErrorHandler.scriptline $ErrorNumber = $oIEErrorHandler.number $ErrorNumberHex = Hex($oIEErrorHandler.number, 8) $ErrorDescription = StringStripWS($oIEErrorHandler.description, 2) $ErrorWinDescription = StringStripWS($oIEErrorHandler.WinDescription, 2) $ErrorSource = $oIEErrorHandler.Source $ErrorHelpFile = $oIEErrorHandler.HelpFile $ErrorHelpContext = $oIEErrorHandler.HelpContext $ErrorLastDllError = $oIEErrorHandler.LastDllError $ErrorOutput = "" $ErrorOutput &= "--> COM Error Encountered in " & @ScriptName & @CR $ErrorOutput &= "----> $ErrorScriptline = " & $ErrorScriptline & @CR $ErrorOutput &= "----> $ErrorNumberHex = " & $ErrorNumberHex & @CR $ErrorOutput &= "----> $ErrorNumber = " & $ErrorNumber & @CR $ErrorOutput &= "----> $ErrorWinDescription = " & $ErrorWinDescription & @CR $ErrorOutput &= "----> $ErrorDescription = " & $ErrorDescription & @CR $ErrorOutput &= "----> $ErrorSource = " & $ErrorSource & @CR $ErrorOutput &= "----> $ErrorHelpFile = " & $ErrorHelpFile & @CR $ErrorOutput &= "----> $ErrorHelpContext = " & $ErrorHelpContext & @CR $ErrorOutput &= "----> $ErrorLastDllError = " & $ErrorLastDllError MsgBox(0,"COM Error", $ErrorOutput) SetError(1) Return EndFunc ;==>MyErrFunc But I have errors ((( Link to comment Share on other sites More sharing options...
DaleHohm Posted December 21, 2012 Share Posted December 21, 2012 So, I see that you would like us to guess what errors you are getting and where they originate and then suggest how you should fix them... 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