public override void Execute(ActionContext context) { try { var ahk = new AutoHotkey.Interop.AutoHotkeyEngine(); ahk.LoadFile(ScriptName); ahk.ExecFunction(FunctionName); while (ahk.IsReady() == true) { System.Threading.Thread.Sleep(100); } ahk.Reset(); // MessageBox.Show("Engine finished."); AhkResult = ("Finished successfully."); } catch (Exception e) { if (e is ActionException) { throw; } throw new ActionException("ActionError", e.Message, e.InnerException); } // TODO: set values to Output Arguments here }
public override void Execute(ActionContext context) { try { var ahk = new AutoHotkey.Interop.AutoHotkeyEngine(); ahk.ExecRaw(RawScript); while (ahk.IsReady() == true) { System.Threading.Thread.Sleep(100); } ahk.Reset(); // MessageBox.Show("Engine finished."); } catch (Exception e) { if (e is ActionException) { throw; } throw new ActionException("ActionError", e.Message, e.InnerException); } }