按键精灵 后台鼠标无效是怎么回事
Hwnd=Plugin.Window.MousePoint()delay1000CallPlugin.Bkgnd.LeftDoubleClick(Hwnd,601,67)...
Hwnd = Plugin.Window.MousePoint()
delay 1000
Call Plugin.Bkgnd.LeftDoubleClick(Hwnd, 601, 67)
delay 1000
发现写的脚本无效,就用ie做了个最简单的测试,编码如上,在百度页面,点击“百度一下”按钮
绝对不是坐标选取错误的问题,是窗口坐标,非屏幕坐标
有人知道为什么无效吗?谢谢 展开
delay 1000
Call Plugin.Bkgnd.LeftDoubleClick(Hwnd, 601, 67)
delay 1000
发现写的脚本无效,就用ie做了个最简单的测试,编码如上,在百度页面,点击“百度一下”按钮
绝对不是坐标选取错误的问题,是窗口坐标,非屏幕坐标
有人知道为什么无效吗?谢谢 展开
展开全部
Rem 选择窗口
Hwnd = Plugin.Window.MousePoint()
stemp=Plugin.Window.GetClass(Hwnd)
If InStr(stemp,"Internet Explorer_Server")>0 then
Else
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"你没有选中IE窗口", "0000FF")
Delay 300
Goto 选择窗口
End If
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"你已经选中IE窗口", "0000FF")
Delay 1000
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"请将鼠标放在按钮位置处,并按下F1键", "0000FF")
Rem 等待按键
k=WaitKey
If k=112 Then
GetCursorPos x, y
Else
Goto 等待按键
End If
sRect = Plugin.Window.GetClientRect(Hwnd)
dim MyArray
MyArray = Split(sRect, "|")
L = Clng(MyArray(0)): T = Clng(MyArray(1))
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"现在可以把鼠标拿开了,看看效果吧???", "0000FF")
Rem 继续
Call Plugin.Bkgnd.LeftClick(Hwnd, x-L, y-T)
Delay 1000
Goto 继续
Hwnd = Plugin.Window.MousePoint()
stemp=Plugin.Window.GetClass(Hwnd)
If InStr(stemp,"Internet Explorer_Server")>0 then
Else
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"你没有选中IE窗口", "0000FF")
Delay 300
Goto 选择窗口
End If
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"你已经选中IE窗口", "0000FF")
Delay 1000
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"请将鼠标放在按钮位置处,并按下F1键", "0000FF")
Rem 等待按键
k=WaitKey
If k=112 Then
GetCursorPos x, y
Else
Goto 等待按键
End If
sRect = Plugin.Window.GetClientRect(Hwnd)
dim MyArray
MyArray = Split(sRect, "|")
L = Clng(MyArray(0)): T = Clng(MyArray(1))
Call Plugin.Msg.ShowScrTXT(0, 0, 400, 20,"现在可以把鼠标拿开了,看看效果吧???", "0000FF")
Rem 继续
Call Plugin.Bkgnd.LeftClick(Hwnd, x-L, y-T)
Delay 1000
Goto 继续
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询