/// <summary> /// Mouse wheel. /// </summary> /// <param name="obj">IUIObject.</param> /// <param name="near">Whether the direction of wheel of the mouse is toward the near.</param> /// <param name="count">Count of wheel.</param> public static void MouseWheel(IUIObject obj, bool near, int count = 1) { obj.Activate(); var mouse = new MouseEmulator(obj.App); mouse.Move(GetTargetPos(obj, null)); mouse.Wheel(near, count); }
/// <summary> /// Mouse wheel. /// </summary> /// <param name="obj">IUIObject.</param> /// <param name="delta">delta value.</param> public static void MouseWheel(IUIObject obj, int delta) { obj.Activate(); var mouse = new MouseEmulator(obj.App); mouse.Move(GetTargetPos(obj, null)); mouse.Wheel(delta); }
/// <summary> /// Alt + Key. /// </summary> /// <param name="obj">IUIObject.</param> /// <param name="key">key.</param> public static void SendAltAnd(IUIObject obj, Keys key) { obj.Activate(); new KeybordEmulator(obj.App).SendAltAnd(key); }
/// <summary> /// Send the key with modify. /// </summary> /// <param name="obj">IUIObject.</param> /// <param name="isControl">Is the Ctrl key pressed.</param> /// <param name="isShift">Is the Shift key pressed.</param> /// <param name="isAlt">Is the Alt key pressed.</param> /// <param name="key">key.</param> public static void SendModifyAnd(IUIObject obj, bool isControl, bool isShift, bool isAlt, Keys key) { obj.Activate(); new KeybordEmulator(obj.App).SendModifyAnd(isControl, isShift, isAlt, key); }
/// <summary> /// Send the keys. /// </summary> /// <param name="obj">IUIObject.</param> /// <param name="keys">Keys for sending. It is the same as the rule of System.Windows.Forms.SendKeys.</param> public static void Send(IUIObject obj, string keys) { obj.Activate(); new KeybordEmulator(obj.App).Send(keys); }