Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ok. So whenever I have Timer 1 do this:
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- WebBrowser1.Document.GetElementById("claimIt").InvokeMember("Click")
- End Sub
- It autoclicks basically forever - until it becomes unresponsive, but then when I do this:
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- WebBrowser1.Document.GetElementById("claimIt").InvokeMember("Click")
- Timer1.Enabled = False
- End Sub
- It actually ends timer1 after submitting ONE time, and no more submitting or "autoclicking" is done after that.
- Now with your code:
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- If Not number_of_ticks > 20 Then
- WebBrowser1.Document.GetElementById("claimIt").InvokeMember("Click")
- Else
- 'number_of_ticks has exceed the maximum amount of allowed ticks
- Timer1.Enabled = False
- End If
- End Sub
- And don't forget I have:
- Public Class Form1
- Dim number_of_ticks As Integer = 0
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- End Sub
- 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