当屏幕的某一点为红色时,鼠标移动到某一点,执行点击左键的操作,用VB可以实现么,最好是用按键精灵 50
还有,屏幕取点的函数是什么刚才用按键精灵写了一个,不过好像判断颜色的语句还是不对,帮忙看看,问题出在哪里For10000IfColor413,255,001AFF,1Mo...
还有,屏幕取点的函数是什么
刚才用按键精灵写了一个,不过好像判断颜色的语句还是不对,帮忙看看,问题出在哪里
For 10000
IfColor 413,255,001AFF,1
MoveTo 388,314
Delay 3000
LeftClick 1
EndIf
EndFor 展开
刚才用按键精灵写了一个,不过好像判断颜色的语句还是不对,帮忙看看,问题出在哪里
For 10000
IfColor 413,255,001AFF,1
MoveTo 388,314
Delay 3000
LeftClick 1
EndIf
EndFor 展开
2个回答
展开全部
添加一个label控件
'窗体代码
Private downx As Long
Private downy As Long
Private xx As Long
Private yy As Long
Private MouseDown As Boolean
Private Sub label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
downx = X
downy = Y
MouseDown = True
End Sub
Private Sub label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
xx = X
yy = Y
If MouseDown = True Then Me.Move Me.Left + (xx - downx), Me.Top + (yy - downy)
End Sub
Private Sub label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MouseDown = False
End Sub
这样就行了!!
'窗体代码
Private downx As Long
Private downy As Long
Private xx As Long
Private yy As Long
Private MouseDown As Boolean
Private Sub label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
downx = X
downy = Y
MouseDown = True
End Sub
Private Sub label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
xx = X
yy = Y
If MouseDown = True Then Me.Move Me.Left + (xx - downx), Me.Top + (yy - downy)
End Sub
Private Sub label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MouseDown = False
End Sub
这样就行了!!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询