Adblock breaks this site

NEED autoclicker code!

Discussion in 'Programming General' started by darthvador91, Nov 6, 2007.

  1. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    NEED autoclicker code!

    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...
     
  2. skate4lifee

    skate4lifee Active Member

    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0
    NEED autoclicker code!

    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. =)
     
  3. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    NEED autoclicker code!

    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
     
  4. skate4lifee

    skate4lifee Active Member

    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0
    NEED autoclicker code!

    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.
     
  5. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    NEED autoclicker code!

    I dont have vb.net on this computer , the 30 days ran out. so ima have to wait til i get to school tomorrow

    thank you very much BTW

    i rly hope this works :)
     
  6. skate4lifee

    skate4lifee Active Member

    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0
    NEED autoclicker code!

    visual basic express is free, you just need to have a hotmail account and you get a key.
     
  7. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    NEED autoclicker code!

    seriously ?/ how/where ??
     
  8. skate4lifee

    skate4lifee Active Member

    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0
    NEED autoclicker code!

    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.
     
  9. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    NEED autoclicker code!

    k i try :)

    and ty
     
  10. dertan

    dertan Guest

    Referrals:
    0
    NEED autoclicker code!

  11. elborio

    elborio Guest

    Referrals:
    0
    NEED autoclicker code!

    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
     
  12. prevan

    prevan Active Member

    Joined:
    Feb 19, 2008
    Posts:
    207
    Referrals:
    1
    Sythe Gold:
    1
    NEED autoclicker code!

    thanks, this helped out alot
     
< Basic string parser | Temporary File Cleaner program (C++) >


 
 
Adblock breaks this site