谁帮我写一个VB鼠标移动后点击的程序!~
写一个VB移动到坐标点上``然后单击一下```然后在移动到另外一个点上在单击一下``中间延迟1.5秒````然后再返回原来的点上,就一直重复这样的工作!是按F9开始F12...
写一个VB移动到坐标点上``然后单击一下```然后在移动到另外一个点上在单击一下``中间延迟1.5秒````然后再返回原来的点上,就一直重复这样的工作!
是按F9开始 F12停止运行!!
不好意思!~你能再帮我加上鼠标点击,然后在点另外一个坐标么
然后再循环回原来那个坐标上`````我不会VB的``能写的全一些么?
我就是不想用按键所以才!~~~ 展开
是按F9开始 F12停止运行!!
不好意思!~你能再帮我加上鼠标点击,然后在点另外一个坐标么
然后再循环回原来那个坐标上`````我不会VB的``能写的全一些么?
我就是不想用按键所以才!~~~ 展开
4个回答
展开全部
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" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Const MOUSEEVENTF_MOVE = &H1 ' mouse move
Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
Private Sub Timer1_Timer()
SetCursorPos x1, y1
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
Sleep 1500
SetCursorPos x0, y0
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Const MOUSEEVENTF_MOVE = &H1 ' mouse move
Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
Private Sub Timer1_Timer()
SetCursorPos x1, y1
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
Sleep 1500
SetCursorPos x0, y0
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
展开全部
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub WaitSomeTime(tTime As Single)
If tTime > 100 Then
For I = 0 To tTime \ 100
WaitSomeTime 100
DoEvents
Next
If tTime Mod 100 <> 0 Then WaitSomeTime tTime Mod 100
Else
Sleep tTime
End If
DoEvents
End Sub
Private Sub Command1_Click()
WaitSomeTime 1000
I = SetCursorPos(130, 336)
End Sub
F9 跟 F12 开始跟停止你就自己写吧
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub WaitSomeTime(tTime As Single)
If tTime > 100 Then
For I = 0 To tTime \ 100
WaitSomeTime 100
DoEvents
Next
If tTime Mod 100 <> 0 Then WaitSomeTime tTime Mod 100
Else
Sleep tTime
End If
DoEvents
End Sub
Private Sub Command1_Click()
WaitSomeTime 1000
I = SetCursorPos(130, 336)
End Sub
F9 跟 F12 开始跟停止你就自己写吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你可以用按键精灵,很简单的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你去下个按键精灵就好了。还写什么程序呀。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询