Crates.io | mouse_automation |
lib.rs | mouse_automation |
version | 0.1.3 |
source | src |
created_at | 2015-12-27 20:53:19.757995 |
updated_at | 2016-01-08 03:14:32.234967 |
description | A winapi wrapper that provides easy mouse automation. |
homepage | https://github.com/obv-mikhail/mouse_automation |
repository | https://github.com/obv-mikhail/mouse_automation |
max_upload_size | |
id | 3768 |
size | 3,175 |
A winapi wrapper that provides easy mouse automation. Can be used from a variety of languages.
Add this to the toml file:
[dependencies]
mouse_automation = "0.1.1"
Example:
extern crate mouse_automation;
fn main() {
mouse_automation::move_mouse(0, 0, true); // moves mouse to top left corner
}
mouse_automation.move_mouse(mut x: i32, mut y: i32, abs: bool);
Third parameter should be true for asbolute movement, and false for relative.
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.
mouse_automation.wheel(movement: u32);
The sign of the parameter indicates the direction of the scrolling.