[vb]按住SHIFT,用鼠标点击一下屏幕上的任何一个地方,鼠标就会自动连续点 ...
发布网友
发布时间:2024-04-01 09:01
我来回答
共1个回答
热心网友
时间:2024-06-17 00:58
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
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 ' left button down
Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button upPrivate Sub Form_Click()
MsgBox ""
End SubPrivate Sub Form_Load()
Timer1.Interval = 50
Timer1.Enabled = True
End SubPrivate Sub Timer1_Timer()
Dim a As Long
a = 0
If GetAsyncKeyState(vbKeyShift) Then
MsgBox "请把鼠标移到你想连点10下的地方按ENTER"
Do
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0: mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
a = a + 1
If a > 10 Then Exit Do
Loop
End IfEnd Sub 一样满足你的要求