Jump to content

_IEDocReadHTML Error


Recommended Posts

I tried this:

$oIEL = _IECreate ($gLink,0,$visible)
...
_IENavigate($oIEL, $Link)
_IELoadWait ($oIEL)
$body = _IEDocReadHTML ($oIEL)

It's work fine until IE open dialog for resending information.

I get this output:

C:\Program Files\AutoIt3\Include\IE.au3 (2021) : ==> Variable must be of type "Object".:
Return SetError($_IEStatus_Success, 0, $o_object.document.documentElement.outerHTML)
Return SetError($_IEStatus_Success, 0, $o_object.document.documentElement^ ERROR

Error is in function _IEDocReadHTML. I need help to code function to send Retry command to dialog box of IE ($oIEL)

Link to comment
Share on other sites

Whole code have more then 1500 lines.

Sometimes it work for few days and sometime only several minutes, before I get error (and dialog box for refreshing page from IE).

I need code to catch dialog box from Windows Internet Explorer (pointed with $oIEL) and send Retry command.

I find similar topic: http://www.autoitscript.com/forum/index.php?showtopic=62612.

Link to comment
Share on other sites

I tried _IEAction second example but it's not work.

; *******************************************************
; Example 2 - Same as Example 1, except instead of using click, give the element focus
;               and then use ControlSend to send Enter.  Use this technique when the
;               browser-side scripting associated with a click action prevents control
;               from being automatically returned to your code.
; *******************************************************
;
#include <IE.au3>
$oIE = _IE_Example ("form")
$oSubmit = _IEGetObjByName ($oIE, "submitExample")
$hwnd = _IEPropertyGet($oIE, "hwnd")
_IEAction ($oSubmit, "focus")
ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}")

; Wait for Alert window, then click on OK
WinWait("Windows Internet Explorer", "ExampleFormSubmitted")
ControlClick("Windows Internet Explorer", "ExampleFormSubmitted", "[CLASS:Button; TEXT:OK; Instance:1;]")
_IELoadWait ($oIE)

I get Alert window but script never click OK.

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...