public void can_load_and_execute_file_with_function() { engine.Load("functions.ahk"); bool helloFunctionExists = engine.FunctionExists("hello_message"); Assert.True(helloFunctionExists); var result = engine.ExecFunction("hello_message", "John"); Assert.Equal("Hello, John", result); }
public static AutoHotkeyEngine Run()//toto make disposable wrapper to deal with saving state, saved positions..ect. { var ptr = Marshal.GetFunctionPointerForDelegate(ahkDelegate); var ahk = new AutoHotkeyEngine(); ahk.Load("input.ahk"); ahk.SetVar("ptr", ptr.ToString()); return(ahk); }
public void Load(string filePath) { ahk.Load(filePath); }