Sign in to follow this  
Followers 0
Ebenezer

Object.document.readystate Error While Using Ie.au3

3 posts in this topic

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 :)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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