Jump to content

_IELoadWait() does not see that page has loaded


Recommended Posts

I've been using _IE.au3 for ages, but have never encountered this kind of problem before:

_IELoadWait() does not see that page has loaded. Weirdness :)

I've no idea whats wrong with these particular pages. Hoping someone with more web experience can explain it. From hundreds of "same" pages these 2 always "timeout", even though they've been loaded, status bar says "Done".

System: winXP Pro SP3; IE 8.0, AutoIt 3.3.0.0

#include <IE.au3>
$oIE = _IECreate('about:blank', 0, 1, 1)
_IENavigateRetry($oIE, "http://tvrage.com/Weeds")
_IENavigateRetry($oIE, "http://tvrage.com/Dirty_Sexy_Money")
_IEQuit($oIE)

Func _IENavigateRetry(ByRef $o_ie, $s_url, $i_timeoutsec = 20, $i_retry = 3)
    Local $i_error
    __IEErrorNotify("Info", "_IENavigateRetry", "loading URL", $s_url)
    _IELoadWaitTimeout($i_timeoutsec * 1000)
    For $i = 1 To $i_retry
        _IENavigate($o_ie, $s_url)
        $i_error = @error
        If $i_error = 0 Then Return;ok
        If $i_error = 6 Then;reload
            $o_ie.Stop()
            Sleep(1000)
            If $i < $i_retry Then __IEErrorNotify("Info", "_IENavigateRetry", "reload attempt", $i)
            ContinueLoop
        EndIf
    Next
    SetError(1)
    Return
EndFunc  ;==>_IENavigateRetry
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...