Skip to content
Roman edited this page Mar 31, 2017 · 3 revisions

A mouse helper class is also available. You can access it by using the static Mouse class.
You can do clicks (with all buttons), moves (which moves the mouse slowly to a position), directly set positions, scroll the mouse wheel horizontally or vertically or drag the mouse pointer horizontally or vertically.
Examples:

// Directly jump to the position
Mouse.Position = new Point(10, 10);
// Slowly move the mouse to the desired position
Mouse.MoveBy(100, 100);
// Press and release the middle mouse button
Mouse.Click(MouseButton.Middle);
// Scroll 2 lines
Mouse.Scroll(2);
Clone this wiki locally