So im basically developing a program that can record mouse movement and clicks then replay them on a WebBrowserControl.
So recording the movement is easy I just added the mouseposition.x to a listbox and mouseposition.y to a listbox with a timer looping every 10 intervals. To replay them I simply:
MousexList.selectedindex = 0 MouseyList.selectedindex = 0 mouseposition.x = mousexlist.selecteditem mouseposition.y = mouseylist.selecteditem mousexlist.selectedindex + 1 mouseylist.selectedindex + 1
Now I thought recording the clicks would be just as easy... So I added a MouseUp and MouseDown Sub.
Private Sub myBot_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown Select Case e.Button Case MouseButtons.Left LeftClick = True Case MouseButtons.Right RightClick = True End Select End Sub Private Sub myBot_MouseUp(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp Select Case e.Button Case MouseButtons.Left LeftClick = False Case MouseButtons.Right RightClick = False End Select End Sub If rightclick = true or leftclick = true then
Now basiclly when recording if rightclick or leftclick = true then