按键精灵鼠标前台跟随后台移动
Hwnd=Plugin.Window.MousePoint()s=Window.GetClientRect(hwnd)XYArray=Split(s,"|",-1,1)d...
Hwnd = Plugin.Window.MousePoint()
s = Window.GetClientRect(hwnd)
XYArray = Split(s, "|", -1, 1)
dx = XYArray(0)
dy = XYarray(1)
For 16959
Call Plugin.Bkgnd.RightClick(hwnd, 953-dx, 675-dy)
Delay 100
Call Plugin.Bkgnd.KeyPress(hwnd, 9)
Delay 50
Call Plugin.Bkgnd.KeyDown(hwnd, 68)
Delay 200
Call Plugin.Bkgnd.KeyDown(hwnd, 69)
Delay 20
Call Plugin.Bkgnd.KeyUp(hwnd, 69)
Delay 20
Call Plugin.Bkgnd.KeyUp(hwnd, 68)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 51)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 9)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 69)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 81)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 84)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 82)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 70)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 71)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 72)
Delay 200
Next
这是我的脚本,刚学着写呢,是一个游戏转圈拉怪的。但是问题来了,杀完怪我要捡东西,必须要点击鼠标,后台鼠标点击很正常,但是前台就有问题了。会跟随后台的鼠标而移动。。。请问有什么办法只模拟后台而不影响前台鼠标吗? 展开
s = Window.GetClientRect(hwnd)
XYArray = Split(s, "|", -1, 1)
dx = XYArray(0)
dy = XYarray(1)
For 16959
Call Plugin.Bkgnd.RightClick(hwnd, 953-dx, 675-dy)
Delay 100
Call Plugin.Bkgnd.KeyPress(hwnd, 9)
Delay 50
Call Plugin.Bkgnd.KeyDown(hwnd, 68)
Delay 200
Call Plugin.Bkgnd.KeyDown(hwnd, 69)
Delay 20
Call Plugin.Bkgnd.KeyUp(hwnd, 69)
Delay 20
Call Plugin.Bkgnd.KeyUp(hwnd, 68)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 51)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 9)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 69)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 81)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 84)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 82)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 70)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 71)
Delay 200
Call Plugin.Bkgnd.KeyPress(hwnd, 72)
Delay 200
Next
这是我的脚本,刚学着写呢,是一个游戏转圈拉怪的。但是问题来了,杀完怪我要捡东西,必须要点击鼠标,后台鼠标点击很正常,但是前台就有问题了。会跟随后台的鼠标而移动。。。请问有什么办法只模拟后台而不影响前台鼠标吗? 展开
1个回答
展开全部
Call Plugin.Bkgnd.RightClick(hwnd, 953-dx, 675-dy)
这句去掉dx和dy,坐标用窗口后台坐标。这样前台鼠标应该不会跟随了。
这句去掉dx和dy,坐标用窗口后台坐标。这样前台鼠标应该不会跟随了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询