Sign in to follow this  
Followers 0
toni4

_IEDocReadHTML Error

6 posts in this topic

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)

Share this post


Link to post
Share on other sites



Post the whole code.

This part works great for me:

$oIEL = _IECreate ("google.com")
_IENavigate($oIEL,"yahoo.com")
_IELoadWait ($oIEL)
$body = _IEDocReadHTML ($oIEL)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I see- you get the IE refresh OK-Cancel pop -up.

On the link you mentioned there is a solution (maybe even 2 - at least _IEAction second example works for sure) .

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Some of the strings may be different - examine the pop-up with the autoit window info tool to check.

Share this post


Link to post
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
Sign in to follow this  
Followers 0