Jump to content
Sign in to follow this  
asdofasdas

IE.au3 (1940) : ==> Variable must be of type "Object"

Recommended Posts

asdofasdas

I get this error often, but not always. How can I stop the program from crashing because of it?

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

I think this happens when I request the HTML (_IEBodyReadHTML($oIE)) but the current page request hasn't completed or something. Basically I have a While running until I find something I need in the source code. And I don't want any unnecessary Sleep()'s in my code. I do have _IELoadWait($oIE) after every new page, but this doesn't seem to do anything.

Share this post


Link to post
Share on other sites
asdofasdas

Hi and Welcome to the forums!

Have you looked at _IEErrorHandlerRegister()?

Sorry, I'm new at this. In the manual it just says "Register and enable a user COM error handler" for _IEErrorHandlerRegister. Thats just jibberish to me :unsure:

Do you know of any examples where this is being used?

Share this post


Link to post
Share on other sites
AdmiralAlkex

The example in the helpfile isn't enough? Do a search on the forum, it's used everywhere so there's no lack of examples. Also lookup "Obj/COM Reference" and ObjEvent() in helpfile so you know what this is about.

Share this post


Link to post
Share on other sites
asdofasdas

The example in the helpfile isn't enough? Do a search on the forum, it's used everywhere so there's no lack of examples. Also lookup "Obj/COM Reference" and ObjEvent() in helpfile so you know what this is about.

Ah, turns out I was looking at an outdated manual with no info at all. Thanks.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.