rcsaquino / rsautogui

rsautogui is a GUI automation rust crate for windows.
MIT License
26 stars 1 forks source link

Problem running the keyboard example #2

Closed Caresle closed 1 year ago

Caresle commented 1 year ago

Hi, I'm having an error when i try to run the example of the keyboard:

use rsautogui::keyboard::{self, Key};

fn main() {
    keyboard::typewrite("lorem ipsum"); // Simulates typing the string provided.

    keyboard::key_down(Key::Layout('a')); // Presses specified key down.
    keyboard::key_up(Key::Layout('a')); // Releases specified key up.
    keyboard::key_tap(Key::Layout('a')); // Performs specified key up and down.
}

I get the next error when i run cargo run .

image

Here it's the information about my rust, cargo and rsautogui version

OS: Windows 10
rustc 1.66.0 (69f9c33d7 2022-12-12)
cargo 1.66.0 (d65d197ad 2022-11-15)
rsautogui = "0.1.5"
rcsaquino commented 1 year ago

Hi!

Unfortunately, this is a problem of 1 of the dependencies of this crate. Unless they fix it, there's nothing I can do other than rewrite the crate. I'm planning on rewriting this crate from scratch and minimizing dependencies to avoid problems like this in the future. I'm just not sure when I can start doing it as I have a lot on my hand at the moment. Sorry about the inconvenience.

Cheers!

rcsaquino commented 1 year ago

Should be fixed now