Advertisement
Guest User

Untitled

a guest
Mar 31st, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. Ok. So whenever I have Timer 1 do this:
  2.  
  3. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  4.  
  5. WebBrowser1.Document.GetElementById("claimIt").InvokeMember("Click")
  6.  
  7.  
  8. End Sub
  9.  
  10. It autoclicks basically forever - until it becomes unresponsive, but then when I do this:
  11.  
  12. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  13.  
  14. WebBrowser1.Document.GetElementById("claimIt").InvokeMember("Click")
  15.  
  16. Timer1.Enabled = False
  17.  
  18.  
  19. End Sub
  20.  
  21. It actually ends timer1 after submitting ONE time, and no more submitting or "autoclicking" is done after that.
  22.  
  23. Now with your code:
  24.  
  25. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  26.  
  27.  
  28. If Not number_of_ticks > 20 Then
  29. WebBrowser1.Document.GetElementById("claimIt").InvokeMember("Click")
  30. Else
  31. 'number_of_ticks has exceed the maximum amount of allowed ticks
  32. Timer1.Enabled = False
  33.  
  34. End If
  35.  
  36. End Sub
  37.  
  38. And don't forget I have:
  39.  
  40. Public Class Form1
  41.  
  42. Dim number_of_ticks As Integer = 0
  43.  
  44. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  45.  
  46. End Sub
  47.  
  48. at the top of the page. But when I have this code, it just autoclicks forever, it doesn't stop after 10 seconds.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement