请帮忙把按键精灵前台变后台
发布网友
发布时间:2023-05-17 16:39
我来回答
共1个回答
热心网友
时间:2023-09-15 04:33
//后台找色窗口不能最小化,但可遮挡
//下面网址是插件下载地址
//http://bbs.anjian.com/thread-107721-1-2.html
//解压后放在 按键精灵2014\plugin
Hwnd = Plugin.Window.Foreground()
Plugin.BGCP2_02.TransformWindow Hwnd
sRect = Plugin.Window.GetClientRect(Hwnd)
MyArray = Split(sRect, "|")
L1 =724- Clng(MyArray(0)): T1 =388- Clng(MyArray(1))
L2 =714- Clng(MyArray(0)): T2 =615- Clng(MyArray(1))
Rem 开始
Delay 100
Call Plugin.Bkgnd.KeyPress(Hwnd, 66)
Delay 2000
Call Plugin.Bkgnd.KeyPress(Hwnd, 90)
Delay 1000
Rem A
YS1=Plugin.BGCP2_02.GetPixelColor(hwnd,l1,t1)
If YS1 =Lib.算法.十六进制转十进制("EEF4F4") Then
Delay 100
Call Plugin.Bkgnd.MoveTo(Hwnd, l1, t1)
Delay 100
Call Plugin.Bkgnd.LeftClick(Hwnd, l1, t1)
Delay 1000
Goto 开始
End If
YS2=Plugin.BGCP2_02.GetPixelColor(hwnd,l2,t2)
If YS2 =Lib.算法.十六进制转十进制("00FFFF") Then
Delay 100
Call Plugin.Bkgnd.KeyPress(Hwnd, 86)
Delay 100
Else
Goto A
End If
Delay 1000
Call Plugin.BGCP2_02.UnTransformWindow(hwnd)