public override void Method() { int x, y; if (int.TryParse(Parameters[0], out x) && int.TryParse(Parameters[1], out y)) { InputHelpers.SendMouseMove(x, y); } }
public override void Method() { int delta; if (int.TryParse(Parameters[0], out delta)) { InputHelpers.SendMouseWheel(delta); } }
public override void Method() { if (Parameters.Length > 1) { VirtualKeyCode keyCode = (VirtualKeyCode)(Keys)Enum.Parse(typeof(Keys), Parameters[Parameters.Length - 1], true); List <VirtualKeyCode> modifiers = new List <VirtualKeyCode>(); for (int i = 0; i < Parameters.Length - 1; i++) { VirtualKeyCode vk; string parameter = Parameters[i]; if (parameter.Equals("shift", StringComparison.InvariantCultureIgnoreCase)) { vk = VirtualKeyCode.SHIFT; } else if (parameter.Equals("ctrl", StringComparison.InvariantCultureIgnoreCase) || parameter.Equals("control", StringComparison.InvariantCultureIgnoreCase)) { vk = VirtualKeyCode.CONTROL; } else if (parameter.Equals("alt", StringComparison.InvariantCultureIgnoreCase) || parameter.Equals("menu", StringComparison.InvariantCultureIgnoreCase)) { vk = VirtualKeyCode.MENU; } else { return; } modifiers.Add(vk); } InputHelpers.SendKeyPressModifiers(keyCode, modifiers.ToArray()); } else { VirtualKeyCode keyCode = (VirtualKeyCode)(Keys)Enum.Parse(typeof(Keys), Parameters[0], true); InputHelpers.SendKeyPress(keyCode); } }
public override void Method() { MouseButtons button; if (Parameters.Length == 3) { int x, y; if (int.TryParse(Parameters[0], out x) && int.TryParse(Parameters[1], out y)) { button = (MouseButtons)Enum.Parse(typeof(MouseButtons), Parameters[2], true); InputHelpers.SendMouseClick(x, y, button); } } else { button = (MouseButtons)Enum.Parse(typeof(MouseButtons), Parameters[0], true); InputHelpers.SendMouseClick(button); } }
public override void Method() { MouseButtons button = (MouseButtons)Enum.Parse(typeof(MouseButtons), Parameters[0], true); InputHelpers.SendMouseUp(button); }
public override void Method() { InputHelpers.SendKeyPressText(Parameters[0]); }
public override void Method() { VirtualKeyCode keyCode = (VirtualKeyCode)(Keys)Enum.Parse(typeof(Keys), Parameters[0], true); InputHelpers.SendKeyUp(keyCode); }