VB Code:
For i = 0 To 9999 strHTML = 'get the source. i know it gets the source correctly even when it freezes If InStrB(1, strHTML, "this") <> 0 Then x = x + 1 Label2.Caption = x ElseIf InStrB(1, strHTML, "or this") <> 0 Then x = x + 1 Label2.Caption = x ElseIf InStrB(1, strHTML, "thisthis") <> 0 Then x = x + 1 Label2.Caption = x Else add_log strHTML lstlog.AddItem Time & " Found it" End If DoEvents Sleep 10 Pause (1) Next i
I'm not sure why it's freezing. It's frozen anywhere from the 2nd time to the 38th. Also if you could tell me why it uses 100% of the cpu even with a pause adn DoEvents that would be great. Thanks for any help




Reply With Quote