use keyflow::prelude::*;
use std::thread;
use std::time::Duration;
mod helper;
fn main() -> Result<()> {
Keyflow::builder()
.with_screen(Screen::default()) .initialize()?;
thread::sleep(Duration::from_secs(3));
helper::type_text("Hello Keyflow");
thread::sleep(Duration::from_millis(500));
Keyflow::press_key(Key::ControlLeft);
Keyflow::click_key(Key::A);
Keyflow::release_key(Key::ControlLeft);
thread::sleep(Duration::from_millis(500));
Keyflow::click_key(Key::Enter);
thread::sleep(Duration::from_millis(500));
Keyflow::move_to(500, 300);
thread::sleep(Duration::from_millis(500));
Keyflow::click_button(Button::Left);
thread::sleep(Duration::from_millis(500));
Keyflow::move_by(100, 50);
thread::sleep(Duration::from_millis(500));
Keyflow::scroll_vertical(-3); thread::sleep(Duration::from_millis(500));
Keyflow::scroll_vertical(3);
thread::sleep(Duration::from_secs(2));
Ok(())
}