public static bool IniFlag(string Flag) { if (!Ready) { return(false); } return(!Falsey.Contains(Engine.ExecFunction("DoIniRead", "Flags", Flag))); }
public void can_load_and_execute_file_with_function() { ahk.LoadFile("functions.ahk"); bool helloFunctionExists = ahk.FunctionExists("hello_message"); Assert.True(helloFunctionExists); var result = ahk.ExecFunction("hello_message", "John"); Assert.Equal("Hello, John", result); }
public void Can_load_and_execute_file_with_function() { _ahk.LoadFile("functions.ahk"); var helloFunctionExists = _ahk.FunctionExists("hello_message"); Assert.IsTrue(helloFunctionExists); var result = _ahk.ExecFunction("hello_message", "John"); Assert.AreEqual("Hello, John", result); }
public static bool IniFlag(string flag) { if (!Ready) { return(false); } if (!iniFlagCache.ContainsKey(flag)) { iniFlagCache[flag] = !Falsey.Contains(Engine.ExecFunction("DoIniRead", "Flags", flag)); } return(iniFlagCache[flag]); }
public void can_auto_exec_in_file() { //loads a file and allows the autoexec section to run //(sets a global variable) ahk.LoadFile("script_exec.ahk"); string script_var = ahk.GetVar("script_exec_var"); Assert.Equal("jack skellington", script_var); //run function inside this file to change global variable //(changes the perviously defined global variable) ahk.ExecFunction("script_exec_var_change"); script_var = ahk.GetVar("script_exec_var"); Assert.Equal("zero", script_var); }
public string ExecuteFunction(string functionName, params string[] parameters) { var tempList = parameters.ToList(); while (tempList.Count < 10) { tempList.Add(null); } return(ahk.ExecFunction(functionName, tempList[0], tempList[1], tempList[2], tempList[3], tempList[4], tempList[5], tempList[6], tempList[7], tempList[8], tempList[9])); }
public static IObservable <IOperation> GetAllAhkVars(this AutoHotkeyEngine ahk) { var xy = ahk.ExecFunction("GetMyMouse"); var split = xy.Split('|'); IOperation p = new ProcessInfo { WindowTitle = ahk.ExecFunction("GetMyWindow"), ProcessId = ahk.ExecFunction("GetPid"), ProcessName = ahk.ExecFunction("GetProcessName"), ActiveWindowId = ahk.ExecFunction("GetTransparent") }; IOperation m = new MouseInfo { X = Int32.Parse(split[0]), Y = Int32.Parse(split[1]) }; return(Observable.Return(p). Concat( Observable.Return(m) )); }
public void Test() => _ahk.ExecFunction("Test");
public void ExecFunc(string funcName, string param1 = null, string param2 = null, string param3 = null, string param4 = null, string param5 = null, string param6 = null, string param7 = null, string param8 = null, string param9 = null, string param10 = null) { ahk.ExecFunction(funcName, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); }