|
Thursday, 21 May 2009 06:06 |
|
I need help with my code. I am able to unFollow users using my code, but I get an error (see the gif) every once in awhile. Please tell me where my code is wrong and how I can properly unFollow people using a webcontrol in Visual Basic 6 without an error message.
This should be a VERY easy solution, that should only take a few minutes if you're experienced in VB6 and webcontrols.
My code is:
Private Sub unFollow()
Dim a As Object
Dim c As String
Dim i As Integer
If bolunFollow Then
bolunFollow = False
End If
c = wb.Document.Body.innerHTML
On Error GoTo eh
For Each a In wb.Document.links
If a Like "http://twitter.com/*" Then
If a.className = "url uid" Then
c = a.parentNode.parentNode.parentNode.ID
c = Mid(c, InStr(c, "person_") + 7)
wb.Document.All("remove-btn" & c).Click
While wb.ReadyState <> 4
DoEvents
Wend
End If
End If
Debug.Print a
Next
For Each a In wb.Document.links
If a.innerHTML = "Next ยป" Then
a.Click
End If
Next
bolunFollow = True
eh: If Err.Number = 91 Then Resume Next
End Sub
|