CodeItBetter Programming Another VB Programming Blog

How can i get the mouse to automatically click???? Like on its own.

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
'System & API - How can i get the mouse to automatically click???? Like on its own.
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 MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
 
Private Sub Command1_Click()
    Call mouse_event(MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
    Debug.Print "Am clicking the mouse " & Format$(time, "HH:mm:ss")
End Sub
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.