View Single Post
Old Dec 5th, 2005, 4:13 PM   #9
Pissi
Newbie
 
Join Date: Oct 2005
Posts: 9
Rep Power: 0 Pissi is on a distinguished road
Hey, i did it, and that code you found on a forum is right for the auto talker, they are simple to make, but the clicker..

Put this in as a new module:
Public 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)
Public Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long

    Public Const MOUSEEVENTF_LEFTDOWN = &H2
    Public Const MOUSEEVENTF_LEFTUP = &H4
    Public Const MOUSEEVENTF_MIDDLEDOWN = &H20
    Public Const MOUSEEVENTF_MIDDLEUP = &H40
    Public Const MOUSEEVENTF_RIGHTDOWN = &H8
    Public Const MOUSEEVENTF_RIGHTUP = &H10
    Public Const MOUSEEVENTF_MOVE = &H1

Then make a timer and add this code:

Private Sub Timer1_Timer()
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub

Then just add buttons start and stop and set each one of them to enable/disable the clicker, and also you could add a text box to define the interval of the clicks:

Private Sub Command1_Click()
Timer1.Interval = Text1.Text
Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
Timer1.Interval = Text1.Text
Timer1.Enabled = False
End Sub



hmm...i swear i have made more posts than 2!
Pissi is offline   Reply With Quote