• Log in or sign up for an account here: https://www.sythe.org/login

NEED autoclicker code!

darthvador91

Forum Addict

Banned
Joined
Sep 15, 2007
Sythe Gold
0
Messages
536
Age
36
Location
Wilderness
Could anybody help me out with some code for a vb.net autoclicker?

me and my programmign teacher are gettign togetehr tomorrow to make one but i would really liek a headstart

Please ANY advice is appreciated...
 
i dont remember if i posted my code for my auto typer but it is very similar to the auto clicker. anyways lets begin.

first at the top of your code you will need to declare some stuff

private const MOUSEEVENTF_LEFTDOWN = &H2
private const MOUSEEVENTF_LEFTUP = &H4
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)

next, add 1 timer, 2 buttons (start and stop), and a textbox.

for the timer you will add this code.
Code:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)

then for the start button.
Code:
 timer1.interval = textbox1.text * 1000 ' we do * 1000 so you dont have to put in milliseconds into the textbox.
timer1.enabled = true

then for the stop button
Code:
timer1.enabled = false

hopefully that should work i didn't test it. if anything is wrong just tell me and i will fix it. =)
 
hmmm , im ot an expert but that doesnt exactly look right

This

Code:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
is the part that makes the mosue click ? those are mouse mouvements ;s
 
hmmm , im ot an expert but that doesnt exactly look right

This

Code:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
is the part that makes the mosue click ? those are mouse mouvements ;s

yes, that is what makes it click. you said it didn't look right but have you tried it yet? it should work, once you try it out in an project and it doesn't work. then we can talk. =)

oh yeah, i just quickly tested the code and i think it only works if you compile the program and then run it.
 
visual basic express is free, you just need to have a hotmail account and you get a key.
 
open visual basic>Help>Register Product...>log in with your hotmail, i know you have one because your profile shows that you have an msn.
 
doesnt work:
i used this.

Public Class Form1

Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
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)
Dim tell As Integer

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
tell = 0

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

Cursor.Position = New Point(400, 400)
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If tell = 0 Then
Timer1.Enabled = True
tell = 1
Else
Timer1.Enabled = False
tell = 0
End If
End Sub
End Class
 
Runescape Gamblingrunescape gambling
Back
Top