求大神帮我把这个按键精灵的脚步改成后台运行的

求大神帮我把这个按键精灵的脚步改成后台运行的。O(∩_∩)O谢谢
i = 0
Hwnd = Plugin.Window.Find()
Call Plugin.Window.Active(Hwnd)
Rect = Plugin.Window.GetWindowRect(Hwnd)
MyArray = Split(Rect, "|")
L = Clng(MyArray(0)): T = Clng(MyArray(1))
R = Clng(MyArray(2)): B = Clng(MyArray(3))
Do While True
Delay 5000
Call Plugin.Window.Active(Hwnd)
x = L + 113
y = T + 388
MoveTo x,y
Delay 500
LeftClick 1
x = L + 611
y = T + 283
IfColor x,y,"0602CC",2 Then
MoveTo x,y
Delay 100
LeftClick 1

i = 0
Hwnd = Plugin.Window.Find(0, "这里写上要后台操作的窗口的标题")
Rect = Plugin.Window.GetWindowRect(Hwnd)//建议改成Plugin.Window.GetClientRect(Hwnd)函数,因为后台操作的相对坐标是按客户区计算的,不是按边框计算的
MyArray = Split(Rect, "|")
L = Clng(MyArray(0)) : T = Clng(MyArray(1))
R = Clng(MyArray(2)) : B = Clng(MyArray(3))
Do While True
Delay 5000
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 113, 388)//由于你的计算式是按边框坐标计算的,而后台是按客户端坐标计算的,所以坐标值可能需要稍微改动
GetColor = Plugin.Bkgnd.GetPixelColor(Hwnd, 611, 283)//同上
If GetColor = "0602CC" Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 611, 283)//同上
End If
Loop来自:求助得到的回答
温馨提示:答案为网友推荐,仅供参考
相似回答