Jump to content

Problem with IE!!!


boobo
 Share

Recommended Posts

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 ERROR

What to do???

Edited by boobo
Link to comment
Share on other sites

try downloading the latest version of Autoit again

seems as if somewhat wrong editing has been done with the IE UDF

Edited 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

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

  • Moderators

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...