Jump to content

Object.document.readystate Error While Using Ie.au3


Recommended Posts

Hello,

When I try to navigate to a page using the _IENavigate command I frequently get the following error:

D:\Utilities\AutoIt3\beta\Include\IE.au3 (1236) : ==> The requested action with this object has failed.: 
While ($o_object.document.readyState <> "complete") and ($o_object.document.readyState <> 4) 
While ($o_object.document^ ERROR

Now this is most probably due to the page visited. It is known for frequent slowdowns and errors. Simply trying again should do the trick.

Now my question would be: Is there a way to have the program simply repeat the _IENavigate command instead of crashing?

Thanks for your help :)

Link to comment
Share on other sites

  • Developers

add a com error handler and test the error ...

Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc"); Install a custom error handler 
;
;Your code were you can test the @error...
; 
Func MyErrFunc() 
   $HexNumber=hex($oMyError.number,8) 
   ConsoleWrite("COM Error !  LineNumber " & $oMyError.scriptline &  "  errNumber: " & $HexNumber &  "Desc: " & $oMyError.description  & "Windesc: " & $oMyError.windescription ) 
   SetError(1)  ; something to check for when this function returns 
Endfunc
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hello,

When I try to navigate to a page using the _IENavigate command I frequently get the following error:

D:\Utilities\AutoIt3\beta\Include\IE.au3 (1236) : ==> The requested action with this object has failed.: 
While ($o_object.document.readyState <> "complete") and ($o_object.document.readyState <> 4) 
While ($o_object.document^ ERROR

Now this is most probably due to the page visited. It is known for frequent slowdowns and errors. Simply trying again should do the trick.

Now my question would be: Is there a way to have the program simply repeat the _IENavigate command instead of crashing?

Thanks for your help :)

it's actually a COM error you're getting rather than an autoit error. i believe that this is the same issue that dale is actively trying to recreate and stop. if you look at some of his more recent posts, they include some debugging code that you can use to help him identify and eliminate the issue. There is also some code for trapping COM errors that you could use to just reload your script in the case of a COM error, so it will obscure the error from the user...
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...