I've got my code all ready to go, except what i want to do is have the 'btnSTART' button move the mouse to the selected coordinates, and Left Click down then Left Click up. Here's my code:
Public Class Form1
Public Declare Auto Function GetCursorPos Lib "User32.dll" (ByRef lpPoint As Point) As Integer
Dim mousepos As Point
' This stores the cordinates of the mouse cursors location
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Enabled = True
Timer1.Start()
End Sub
Public Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim R As Long = GetCursorPos(mousepos) ' You'll get your location in mousepos
lblCoordinates.Text = "Current Mouse Location: " & vbCrLf & "X: " & mousepos.X & vbCrLf & "Y: " & mousepos.Y
End Sub
Private Sub btnSetCoordinate_Click(sender As Object, e As EventArgs) Handles btnSetCoordinate.Click
txtCoordinateX.Text = mousepos.X
txtCoordinateY.Text = mousepos.Y
End Sub
Private Sub btnSTART_Click(sender As Object, e As EventArgs) Handles btnSTART.Click
End Sub
End Class
All help is much appreciated!