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
Thanks!
ReplyDeleteI loved this tutorial a lot!
Akshay
www.Akshay.tk
np
ReplyDeleteYou cunt you copied someone elses tutorial this is the exact same thing and there post was before this blog existed.
ReplyDeleteI 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?
ReplyDeleteYes you did,
ReplyDeletehttp://www.gfx-depot.com/forum/-vb-makin-a-simple-autoclicker-t-1566.html
This is not the sam tutorial as mine...
ReplyDeleteit gives me compile error
ReplyDeleteCompile 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
Anonymous, you are definitely an idiot.
ReplyDeletewhy would you even steal this?
ReplyDeleteits 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!