NEED autoclicker code!

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

NEED autoclicker code!
  1. Unread #1 - Nov 6, 2007 at 5:20 PM
  2. darthvador91
    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    darthvador91 Forum Addict
    Banned

    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...
     
  3. Unread #2 - Nov 6, 2007 at 7:02 PM
  4. skate4lifee
    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0

    skate4lifee Active Member

    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. =)
     
  5. Unread #3 - Nov 6, 2007 at 8:25 PM
  6. darthvador91
    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    darthvador91 Forum Addict
    Banned

    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
     
  7. Unread #4 - Nov 6, 2007 at 8:41 PM
  8. skate4lifee
    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0

    skate4lifee Active Member

    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.
     
  9. Unread #5 - Nov 6, 2007 at 8:54 PM
  10. darthvador91
    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    darthvador91 Forum Addict
    Banned

    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 :)
     
  11. Unread #6 - Nov 6, 2007 at 9:30 PM
  12. skate4lifee
    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0

    skate4lifee Active Member

    NEED autoclicker code!

    visual basic express is free, you just need to have a hotmail account and you get a key.
     
  13. Unread #7 - Nov 6, 2007 at 9:42 PM
  14. darthvador91
    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    darthvador91 Forum Addict
    Banned

    NEED autoclicker code!

    seriously ?/ how/where ??
     
  15. Unread #8 - Nov 6, 2007 at 9:49 PM
  16. skate4lifee
    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0

    skate4lifee Active Member

    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.
     
  17. Unread #9 - Nov 6, 2007 at 9:58 PM
  18. darthvador91
    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0

    darthvador91 Forum Addict
    Banned

    NEED autoclicker code!

    k i try :)

    and ty
     
  19. Unread #10 - Jan 4, 2008 at 9:26 PM
  20. dertan
    Referrals:
    0

    dertan Guest

    NEED autoclicker code!

  21. Unread #11 - Jan 12, 2008 at 1:05 PM
  22. elborio
    Referrals:
    0

    elborio Guest

    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
     
  23. Unread #12 - Mar 4, 2008 at 12:14 AM
  24. prevan
    Joined:
    Feb 19, 2008
    Posts:
    207
    Referrals:
    1
    Sythe Gold:
    1

    prevan Active Member

    NEED autoclicker code!

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

Users viewing this thread
1 guest


 
 
Adblock breaks this site