Right a LONG time ago I made an auto-typer and an auto-clicker (Before I knew about GarysHood) I personally think they are very basic but they get the job done!
I will also post the code so if anybody wants to learn off it they can.
The Auto-Clicker
Code:
Public Class Form1
Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, ByVal dwExtraInfo As Long)
'Honestly, I had no idea what the above line was until I looked up a tutorial on how to make an autoclicker/basically this is what calls upon the mouseclicking it also works with user64 (but, I am guessing it will only work on 64bit computers)
Private Declare Function Getasynckeystate Lib "user32" Alias "GetAsyncKeyState" (ByVal VKEY As Integer) As Short
'this gives the option to get keys (like in c# but a little differently)
Private Const mouseclickup = 4
Private Const mouseclickdown = 2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Interval = TextBox1.Text
mouse_event(mouseclickup, 0, 0, 0, 0)
mouse_event(mouseclickdown, 0, 0, 0, 0)
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If GetAsyncKeyState(Keys.F4) Then
If CheckBox1.Checked = True Then
Timer1.Start()
End If
End If
If Getasynckeystate(Keys.F6) Then
Timer1.Stop()
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Button3.Text = Val(Button3.Text) + Val(1)
End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
The Auto-Typer
Code:
Public Class Form1
Private Declare Function Getasynckeystate Lib "user32" Alias "GetAsyncKeyState" (ByVal VKEY As Integer) As Short
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Interval = TextBox2.Text * 1000
Timer1.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If GetAsyncKeyState(Keys.F4) Then
Timer1.Start()
End If
If Getasynckeystate(Keys.F6) Then
Timer1.Stop()
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class