Skip to content

Instantly share code, notes, and snippets.

@aviaryan
Last active December 15, 2015 21:29
Show Gist options
  • Save aviaryan/5325728 to your computer and use it in GitHub Desktop.
Save aviaryan/5325728 to your computer and use it in GitHub Desktop.
Decrease speed of Mouse Cursor via Autohotkey script
;By Avi Aryan
;Set that 4 [line 8] to lower if you want finer results.
#Persistent
CoordMode,Mouse
SetBatchLines, -1
SetMouseDelay, -1
SetTimer,mouseslow,4
mouseslow:
if (toggle == 0)
toggle := 1
else
toggle := 0
MouseGetPos,x%toggle%,y%toggle%
xfactor := x0 - x1
yfactor := y0 - y1
StringReplace,xfactor,xfactor,-
StringReplace,yfactor,yfactor,-
if (toggle == 0)
{
if ((xfactor > 2) && (yfactor > 2))
MouseMove,%x1%,%y1%
else if (yfactor > 2)
MouseMove,%x0%,%y1%
else if (xfactor > 2)
MouseMove,%x1%,%y1%
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment