如何用按键精灵抓相对颜色

来源:百度知道 编辑:UC知道 时间:2024/06/05 20:07:13
我想用按键精灵抓一个游戏的颜色 但是窗口化游戏每次启动的时候窗口位置会变化 能不能抓游戏窗口内的相对坐标颜色 免的我每次都要重新设置新脚本

[General]
Description=左上角
BeginHotkey=122
BeginHotkeyMod=0
PauseHotkey=0
PauseHotkeyMod=0
StopHotkey=123
StopHotkeyMod=0
RunOnce=1
EnableWindow=
Enable=1
AutoRun=0
[Repeat]
Type=0
Number=1
[Relative]
SetupOCXFile=
[Comment]
Content=

[Script]
dim CK
Plugin CK = Window.Foreground()
//插件命令,获取位于当前窗口的句柄
Plugin Window.Move(CK, 0, 0)
//插件命令,移动目标窗口至坐标0,0

不用再去抓色,只需解决窗口位置变化的问题就行了。以上代码是把窗口移动到左上角,只需在这个位置抓色确定坐标,以后要使用脚本的时候再先运行次这个脚本就行了