我想在VB.NET
中创建一个软件,该软件会读取所有屏幕内容,并在特定时间间隔后点击特定位置。
任何人都可以帮助我如何启动它。
答案 0 :(得分:0)
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 Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
Const MOUSEEVENTF_LEFTDOWN = &H2
Const MOUSEEVENTF_LEFTUP = &H4
要设置光标位置,请使用SetCursorPos(x,y)
。 x
和y
是屏幕坐标。
点击:mouse_event(MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
您可以在Visual Basic here中找到有关调用Windows API的更多详细信息。