Jump to content

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


Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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