10 September 2008

Make Autoclicker in VB6 (tut)

1. Open VB6 and start Standard exe

2. Add 2 buttons, horizontal scrollbar, timer and label

3. Name---Caption
    cmdStart---Start
    cmdStop---Stop 

Erase caption inside label 

4. Click on any button and add this code:

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)

Private Const MOUSELEFTDOWN = &H2 '  left button down /This is actually MOUSEEVENTF_LEFTDOWN
Private Const MOUSELEFTUP = &H4 '  left button up /This is actually MOUSEEVENTF_LEFTUP

Private Sub Form_Load()
    Label1.Caption = HScroll1.Value
    Timer1.Enabled = False
    Timer1.Interval = HScroll1.Value
End Sub

Private Sub HScroll1_Change()
    Label1.Caption = HScroll1.Value
    Timer1.Interval = HScroll1.Value
End Sub

Private Sub HScroll1_Scroll()
    Label1.Caption = HScroll1.Value
    Timer1.Interval = HScroll1.Value
End Sub
Private Sub cmdStart_Click()
    Timer1.Enabled = True
End Sub

Private Sub cmdStop_Click()
    Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()
    mouse_event MOUSELEFTDOWN, 0, 0, 0, 0 'left button goes down
    mouse_event MOUSELEFTUP, 0, 0, 0, 0 'left button comes up
End Sub

5. Click on Horizontal ScrollBar and in options set "Max" to 5000 and "Min" to 10




9 comments:

  1. Thanks!

    I loved this tutorial a lot!

    Akshay
    www.Akshay.tk

    ReplyDelete
  2. You cunt you copied someone elses tutorial this is the exact same thing and there post was before this blog existed.

    ReplyDelete
  3. I never copy anything from somone elses. I dunno, maybe a codincidence, that we have it same. If I would copy it, I would write credits go to and then who....so my asnwer is, No I have not copied this. Maybe I posted it there 2. Can u link me the post u saw?

    ReplyDelete
  4. Yes you did,

    http://www.gfx-depot.com/forum/-vb-makin-a-simple-autoclicker-t-1566.html

    ReplyDelete
  5. This is not the sam tutorial as mine...

    ReplyDelete
  6. it gives me compile error
    Compile error:
    Only comments may appear after End Sub, End Function, or End Proptery
    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

    ReplyDelete
  7. Anonymous, you are definitely an idiot.

    ReplyDelete
  8. why would you even steal this?
    its got all the marks of a skript kiddie

    if your gunna teach people to program at least avoid the most basic of poor programming practices!

    ReplyDelete

hack4life4.hax0r@gmail.com