use rsautogui::mouse; use std::thread::sleep; use std::time::Duration; fn main() { let timeseconds = Duration::from_secs(5); let mut x: u16; let y: u16 = 1080; let mut i = 1; loop { if i==1 { x = 300; i = 0; }else { i = 1; x = 100; } mouse::move_to(x, y); sleep(timeseconds); } }
标签:mut,use,sleep,防锁,let,mouse,rust From: https://www.cnblogs.com/pythonClub/p/17766865.html