如何使用autohotkey.interop从C#运行完整的AHK文件



我使用autohotkey来完成工作。但是,在背景中,防治软件可检测Autohotkey。因此,我找到了一种与C#一起使用AHK的方法:autohotkey.interop。

,但我找不到使用AutoHotkey.interop。

喜欢这个

AutoHotkeyEngine ahk = AutoHotkeyEngine.Instance;
ahk.LoadScript("test.ahk");

test.ahk

F1::
    CoordMode,ToolTip,Screen
    MouseGetPos,xpos, ypos
    MsgBox, %xpos% , %ypos%
F2::
    ExitApp

我想将普通.AHK文件编译到C#。

不是您问题的实际答案,但是如果反欺骗是一个问题,您可能会尝试从沙箱中运行编译的Ahk-File。有人告诉我这是一个问题。

最新更新