public void Test_pipe_communication() { Init_pipes(); const string ahkCode = @"serverMessage := SendPipeMessage(""Hello"")"; _ahk.LoadScript(ahkCode); Assert.AreEqual("SERVER:Hello", _ahk.GetVar("serverMessage")); }
/// <summary> /// A convenience method for loading a collection of AutoHotkeyToggle objects into an instance of AutoHotkey. /// </summary> /// <param name="ahk">The instance of AutoHotkey into which to load the toggles.</param> /// <param name="toggles">A collection of AutoHotkeyToggle objects to load into AutoHotkey.</param> public static void LoadToggles(this AutoHotkeyEngine ahk, IEnumerable <AutoHotkeyToggle> toggles) { var sb = new StringBuilder(); foreach (var toggle in toggles) { sb.AppendLine(toggle.GetDeclaration()); } ahk.LoadScript(sb.ToString()); }
public void test_pipe_communication() { init_pipes(); string ahk_code = @"serverMessage := SendPipeMessage(""Hello"") "; ahk.LoadScript(ahk_code); Assert.Equal("SERVER:Hello", ahk.GetVar("serverMessage")); }