use noct::{MouseButton, MouseControllable, Noct}; use std::thread; use std::time::Duration; fn main() { let wait_time = Duration::from_secs(2); let mut noct = Noct::new(); thread::sleep(wait_time); noct.mouse_move_to(500, 200); thread::sleep(wait_time); noct.mouse_down(MouseButton::Left); thread::sleep(wait_time); noct.mouse_move_relative(100, 100); thread::sleep(wait_time); noct.mouse_up(MouseButton::Left); thread::sleep(wait_time); noct.mouse_click(MouseButton::Left); thread::sleep(wait_time); noct.mouse_scroll_x(2); thread::sleep(wait_time); noct.mouse_scroll_x(-2); thread::sleep(wait_time); noct.mouse_scroll_y(2); thread::sleep(wait_time); noct.mouse_scroll_y(-2); thread::sleep(wait_time); }