Sign in to follow this  
Followers 0
Andreik

_IEDocWriteHTML return Invalid Data Type

2 posts in this topic

#1 ·  Posted (edited)

I'm sure that I am too close to see what is the problem in this simple example.

#include <IE.au3>

Local $oIE = _IECreateEmbedded()
If Not IsObj($oIE) Then ConsoleWrite('Object creation fail.' & @CRLF)
GUICreate("Test",1000,600)
GUICtrlCreateObj($oIE,0,0,1000,600)
_IEDocWriteHTML($oIE,'<html><body bgcolor=#00FF00></body></html>')
_IEAction($oIE,'refresh')
GUISetState(@SW_SHOW)

Do
    Sleep(10)
Until GUIGetMsg() = -3

I'm not sure why _IEDocWriteHTML fails with @error=3 ($_IEStatus_InvalidDataType). When I run this script in console I have this:

 

--> IE.au3 T3.0-1 Error from function _IELoadWait, $_IEStatus_InvalidDataType
--> IE.au3 T3.0-1 Error from function _IEAction(refresh), $_IEStatus_COMError (4)

 

EDIT: got it, I forgot _IENavigate($oIE,'about:blank')

Edited by Andreik

When the words fail... music speaks

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