private async void OnBtnMRightClick(object sender, RoutedEventArgs e) { Winuser.POINT curPos; Winuser.GetCursorPos(out curPos); await WindowsInput.Simulate.Events() .MoveTo(centerScreenPosX, centerScreenPosY) .Click(ButtonCode.Right) .Wait(100) .MoveTo(curPos.X, curPos.Y) .Invoke(); }
private async void OnBtnMDownClick(object sender, RoutedEventArgs e) { Winuser.POINT curPos; Winuser.GetCursorPos(out curPos); await WindowsInput.Simulate.Events() .MoveTo(centerScreenPosX, centerScreenPosY) .Scroll(ButtonCode.VScroll, ButtonScrollDirection.Down) .Wait(100) .MoveTo(curPos.X, curPos.Y) .Invoke(); }