Windows硬件系统函数 - mouse_event
来源:互联网 发布:股票交易大数据 编辑:程序博客网 时间:2024/04/30 10:05
进行相对运动的时候,由SystemParametersInfo函数规定的系统鼠标轨迹速度会应用于鼠标运行的速度
例子:
连续点击左键 1000次(私服游戏加点)
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_MOVE = &H1 '移动鼠标
Private Const MOUSEEVENTF_LEFTDOWN = &H2 '模拟鼠标左键按下
Private Const MOUSEEVENTF_LEFTUP = &H4 '模拟鼠标左键抬起
Private Const MOUSEEVENTF_RIGHTDOWN = &H8 '模拟鼠标右键按下
Private Const MOUSEEVENTF_RIGHTUP = &H10 '模拟鼠标右键抬起
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20 '模拟鼠标中键按下
Private Const MOUSEEVENTF_MIDDLEUP = &H40 '模拟鼠标中键抬起
Private Const MOUSEEVENTF_ABSOLUTE = &H8000 '标示是否采用绝对坐标
Private Sub Command1_Click()
Dim i As Integer
For i = 1 to 1000
mouse_event MOUSEEVENTF_RIGHTDOWN Or MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
Next i
End Sub
- Windows硬件系统函数 - mouse_event
- Windows API中mouse_event函数
- Windows硬件系统函数 - ExitWindowsEx
- Windows硬件系统函数 - GetAsyncKeyState
- Windows硬件系统函数 - GetComputerName
- Windows硬件系统函数 - GetCursorPos
- Windows硬件系统函数 - GetDoubleClickTime
- Windows硬件系统函数 - GetSysColor
- Windows硬件系统函数 - GetTickCount
- Windows硬件系统函数 - GetUserName
- Windows硬件系统函数 - SetComputerName
- Windows硬件系统函数 - SetCursorPos
- Windows硬件系统函数 - SetDoubleClickTime
- Windows硬件系统函数 - ShowCursor
- mouse_event函数
- mouse_event函数
- Windows硬件系统函数 - ClipCursor, ClipCursorBynum
- keybd_event,mouse_event函数使用方法
- Windows硬件系统函数 - GetTickCount
- 【转帖】C# 对txt操作
- 继续调试
- Windows硬件系统函数 - GetUserName
- 【aha, Insight】原来二进制数是这样
- Windows硬件系统函数 - mouse_event
- Windows硬件系统函数 - SetComputerName
- Windows硬件系统函数 - SetCursorPos
- 絮絮叨叨
- Windows硬件系统函数 - SetDoubleClickTime
- Windows硬件系统函数 - ShowCursor
- KMP字符串匹配算法
- 如何 不依赖 Eclipse 使用 SWT
- Windows控件消息函数 - FindWindow