VB鼠标自动点击一个点
VB鼠标自动点击一个点不需要很复杂,只要能让鼠标点一个固定的点就OK了谁能帮忙做一下,发个源码,急需!我要的不是随便从网上着的不能用的,希望不要发这种费话...
VB鼠标自动点击一个点
不需要很复杂,只要能让鼠标点一个固定的点就OK了
谁能帮忙做一下,发个源码,急需!
我要的不是随便从网上着的不能用的,希望不要发这种费话 展开
不需要很复杂,只要能让鼠标点一个固定的点就OK了
谁能帮忙做一下,发个源码,急需!
我要的不是随便从网上着的不能用的,希望不要发这种费话 展开
展开全部
声明
Declare Function GetPrivateProfileString& Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String)
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)
Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
程序中
SetCursorPos 455, 234 '你所需要点的位置
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, 0&, 0& '模拟鼠标点击
如果要模拟键盘操作就换一个函数
换成keyboard_event
Declare Function GetPrivateProfileString& Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String)
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)
Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
程序中
SetCursorPos 455, 234 '你所需要点的位置
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, 0&, 0& '模拟鼠标点击
如果要模拟键盘操作就换一个函数
换成keyboard_event
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询