如何使用PixelGetColor / PixelSearch更快地发送密钥

时间:2018-01-18 07:08:03

标签: autohotkey sendinput

当我按技能键

时,我正在使用此代码发送底池密钥
*RButton::
{
    PixelGetColor, ColorOutPut, 256, 762, Fast RGB  ;2 last
    if (ColorOutPut =  0x090606)
    {
        ;~ PixelGetColor, ColorOutPut, 273, 750, Fast RGB   ;charge
        ;~ if not (ColorOutPut =  0x3A3436)
        ;~ {
            SetKeyDelay -1,-1
            Sendinput {Blind}{2 down} 
            SetKeyDelay -1,-1
            Sendinput {Blind}{2 up} 
            ;~ }
    }
    SetKeyDelay -1,-1
    SendInput, {Blind}{RButton DownR}
}
return
*RButton up::
SetKeyDelay -1,-1
SendInput, {Blind}{RButton up}
return
对于我来说,PixelGetColor的运行时间是0.1-0.2秒,所以技能在那个时候已经很晚了,因为它我不能发送多个PixelGetColor。 我想问的是如何才能立即阅读颜色和发送密钥,这样我的技能不会迟到? 我无法向前发送技能,因为技能可以从花盆中获得帮助。谢谢你支持。

1 个答案:

答案 0 :(得分:0)

您可能想要添加“处理,优先级,高”。 -1 / -1不是理想的使用,大多数人使用'SetKeyDelay,0'

相关问题