AutoHotKey - 为什么它在游戏中不起作用

时间:2021-02-08 13:00:09

标签: autohotkey

游戏是Grim Dawn,用Steam运行,脚本很简单,如下

$1::
    Send {1}
    sleep 100
    Send {3}
Return

我用管理员运行这个脚本,但是在游戏中没有效果,请问是什么原因?

2 个答案:

答案 0 :(得分:0)

如果 ctrl+alt+5 技巧有效,那么这将是更新的脚本,当您单击自定义热键时,该脚本应该自动执行这些键:

$1::
    Send !^5
    Sleep 3
    Send !^5
    Send {1}
    sleep 100
    Send {3}
Return

答案 1 :(得分:0)

最后试了一下,只用$作为热键映射方法不行,所以换了一个方法,如下

#ifWinActive ahk_class Grim Dawn
loop{
    if GetKeyState("RButton")
    {
        sleep 300
        if GetKeyState("RButton"){
            Send {1}
            sleep 100
            Send {2}
            sleep 100
            Send {3}
            sleep 100
            Send {4}
        }
        
    }
    sleep 50
}
Return