Jump to content

Auto Clicker Won't Click


Tigervu

Recommended Posts

I've tried mutltiple different codes with this but either the program will not start clicking like it is suppose to or I get a PInvoke unbalanced stack error on the mouse events. Can someone tell me why I get these errors or why it won't work properly. I'm using Visual Studios. Public Class Form1Declare Sub mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dx As Int32, ByVal dy As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32)Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadEnd SubPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickTimer1.Stop()End SubPrivate Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickTimer1.Stop()End SubPrivate Sub MyMethod()Windows.Forms.Cursor.Position = New System.Drawing.Point(Windows.Forms.Cursor.Position) 'Draws the point, there my cusor is mouse_event(&H2, 0, 0, 0, 1) 'Cursor will go down (like a click) mouse_event(&H4, 0, 0, 0, 1) 'Cursor goes up again End Sub End SubPrivate Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.ClickTextBox1.Text = TextBox1.Text + 1End SubPrivate Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.TickMyMethod()End SubEnd Class

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...