Jump to content

Refresh Webpage Until True


 Share

Recommended Posts

While $count = 0
               For $i = 0 To UBound($asLink)-1
                  _IELoadWait($oIE)
                  If StringInStr($asLink[$i][1], $sSearch1) And StringInStr($asLink[$i][1], $sSearch1) Then
                     _IENavigate($oIE, $asLink[$i][0])
                     _IELoadWait($oIE)
                     $count = $count + 1
                     ExitLoop
                  Else
                     Send ("{F5}")
                     _IELoadWait($oIE)
                  EndIf
               Next
            WEnd

Everything works with out the loop there is more code but this seems to be whats wrong but basically it will keep constantly refreshing the page however wont find the link until its like 20th refresh and that varies however i want it to go to the link a soon as it is there however it is clearly there but does not find it. Also if there a way to detect a new text to be added to the page. Any help would be much appreciated:)

Link to comment
Share on other sites

Thanks i will try that, I was trying it first on something that was always there however it would not find it when it refreshed however when the refresh code was not there it found it. It was almost as if it was refreshing to fast before the webpage was fully searched what i didn't understand with the use of the if else statement

 

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