Jump to content
Sign in to follow this  
Tigervu

Auto Clicker Won't Click

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...