go-vgo / robotgo

RobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
Apache License 2.0
9.6k stars 879 forks source link

New idea: Change and control options in mouse speed. #589

Open mohnishjha opened 1 year ago

mohnishjha commented 1 year ago

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.

...

wilon commented 1 year ago

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):

Try adjusting these parameters to achieve the desired outcome.