mouse_automation
A winapi wrapper that provides easy mouse automation. Can be used from a variety of languages.
Installation
Rust
Add this to the toml file:
[]
= "0.1.0"
In your project, import the crate like this:
extern crate mouse_automation
Other
The dll needs to be in your project's directory.
Python example:
=
# moves mouse to top left corner
Functionality
Moving the mouse
mouse_automation.move_mouse;
First 2 parameters should be values specifying the amount of movement that needs to occur. If the third parameter is specified to be true the mouse will move to an absolute position.
Simulating a click
mouse_automation.left_down;
mouse_automation.left_up;
mouse_automation.right_down;
mouse_automation.right_up;
mouse_automation.middle_down;
mouse_automation.middle_up;
Two commands are needed to simulate a click, the first sends a down event, and the second an up event.
Wheel scrolling
mouse_automation.wheel;
The sign of the parameter indicates the direction of the scrolling.