MrTanoshii / rusty-autoclicker

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

Implement humanlike mouse movement #12

Closed MrTanoshii closed 1 year ago

MrTanoshii commented 1 year ago

Problem

The app currently uses the rdev crate rdev::EventType::MouseMove to move the mouse immediately to the target click location.

This behavior is fine for the "Bot" app mode but may not be ok for the "Humanlike" mode.

Potential solution

For "Humanlike" mode only

  1. Implement a smooth humanlike mouse movement
    • Add setting to specify mouse move speed,
    • Add setting to enable/disable smooth humanlike mouse movement
  2. Delay the mouse click until the mouse is at the target location

Relevant code

app.rs autoclick()

frankschmitt commented 1 year ago

I'd like to give this one a shot. Can you assign the issue to me, please?

frankschmitt commented 1 year ago

@MrTanoshii Should the movement happen only before the first click? Or should it happen before every click? (as a first try, I added it to the autoclick() function, and therefore, the mouse pointer moves before every click, which "feels" strange)

MrTanoshii commented 1 year ago

Only before the first click (When the mouse is not at the intended click position)

frankschmitt commented 1 year ago

Only before the first click (When the mouse is not at the intended click position)

That's what I thought, thanks!

MrTanoshii commented 1 year ago

Closed by #22

Thanks again for the great work!

frankschmitt commented 1 year ago

Closed by #22

Thanks again for the great work!

You‘re very welcome. Many thanks back to you for your patience & constructive feedback, and if you‘ve got any other issue you‘d like me to work on, just let me know.