robotgo icon indicating copy to clipboard operation
robotgo copied to clipboard

New idea: Change and control options in mouse speed.

Open mohnishjha opened this issue 2 years ago • 1 comments

  • Robotgo version (or commit ref): Version: v0.100.10
  • Go version: 1.20.5
  • Gcc version: 8.1.0 64bit
  • Operating system and bit: Windows 11, 64bit
  • Resolution: No Bug
  • Can you reproduce the bug at Examples:
    • [ ] Yes (provide example code)
    • [ ] No
    • [. ] Not relevant
  • Provide example code: for { robotgo.MoveSmooth(rand.Intn(1500), rand.Intn(800))}

  • Log gist:

Description: So I am trying to get my mouse to move as humanly as possible and I was happy with the way it was moving but my friend pointed out that it was moving too slow and in other such programs it can move a bit faster. So I had the idea to also include mouse speed in one of the parameters of moveSmooth(). Another idea was to somehow control or randomize the speed itself. So for like 10 moves it is fast and for next 5 it is a bit slow and then loop. Something like that, how does that sound? I tried to find the source code so I can change it myself, atleast on my system, but I am quite beginner so idk if that is even possible or not.

If this would mean that there would be too many parameters in moveSmooth then probably a new function to just control the speed?Or is it already there and I am missing something? Please let me know.

...

mohnishjha avatar Jun 10 '23 07:06 mohnishjha

Try robotgo.MoveSmooth(300, 300, 0.01, 0.03, 1), it will move very fast.

You can use it like this robotgo.MoveSmooth(x, y, lowSpeed, hightSpeed, mouseDelay):

  • lowSpeed & hightSpeed, the mouse will move delay between rand them. You can use it to control the speed. Default is 1.0 ~ 3.0.
  • mouseDelay, the mouse will move delay this param + robotgo.MouseSleep. Default is 1. robotgo.MouseSleep default is 0.

Try adjusting these parameters to achieve the desired outcome.

wilon avatar Aug 08 '23 10:08 wilon