MrTanoshii / rusty-autoclicker

A pure Rust portable auto clicker built for Linux, macOS & Windows.
Creative Commons Zero v1.0 Universal
76 stars 12 forks source link

Feature/add humanlike mouse movement #12 #22

Closed frankschmitt closed 2 years ago

frankschmitt commented 2 years ago

Add human-like mouse movement. This implements #12.

To achieve this, I

frankschmitt commented 2 years ago

Thanks for the PR, please run and solve cargo fmt and cargo clippy warnings.

cargo fmt / cargo clippy seem to be happy now.

I nearly broke the repo solving the merge conflicts, I'm too used to the comfy GUIs, CLI is not something I often work with (although I should).

I feel your pain - I'm used to merging / conflict resolution with TortoiseGit on Windows myself, and I haven't yet found an adequate client for Linux (I'm pretty comfortable with basic git operations on the command line, but I consider conflict resolution without a GUI to be very cumbersome).

I requested a few changes, about half is moving constants to constants.rs (great initiative btw, I should have done that a while ago)

Thanks :-)

The other half is related to the mouse movement itself.

I think it might be best to put the humanlike cursor movement around L369 after all as opposed to the update() loop. It would also ensure that the move_to() only affects humanlike mode in the setting coords mode. What do you think?

Ah. It seems I broke the botlike cursor movement, sorry for that. I've done the refactoring as requested; however, it seems I introduced a new bug (auto-clicking only happens once upon the second, third, ... execution if you switch between bot-like and human-like mode. I'll have to investigate this).

MrTanoshii commented 2 years ago

Ah. It seems I broke the botlike cursor movement, sorry for that. I've done the refactoring as requested; however, it seems I introduced a new bug (auto-clicking only happens once upon the second, third, ... execution if you switch between bot-like and human-like mode. I'll have to investigate this).

I can't reproduce that bug on my end