Mikhail22 / drag-scroll--autohotkey

AHK scripts
42 stars 8 forks source link

Fix no scrolling with slow mouse movement #1

Closed derekpock closed 5 years ago

derekpock commented 5 years ago

If the user is holding right-click and moving their mouse very slowly (having a very small k can exasperate this), this script wouldn't scroll at all. This is because dY remainder from conversion to moves was not stored. By allowing dY to have a remainder between loops, we can get more consistent scrolling and better operation when slowly moving the mouse.

Test the original bug by setting k to 0.01. Run the script, hold right-click, and move the mouse very slowly (2 pixel per sec). You'll notice no movement without this fix.

Mikhail22 commented 5 years ago

@derekpock cool, thanks! It works better now.