Last active
January 11, 2022 19:59
-
-
Save willwade/c399997732c317b16c6fcdf6b61e7e3b to your computer and use it in GitHub Desktop.
Mouse2Keypress - This AHK Script recognises any movement (you can adjust the sensitivity) and then sends a space bar.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#persistent | |
coordmode, mouse, screen | |
mousegetpos, sx, sy | |
settimer, check, 250 | |
return | |
check: | |
mousegetpos, cx, cy | |
if (cx != sx or cy != sy) | |
{ | |
; mouse has moved, calculate by how much | |
if (cx > (sx+50) or cx < (sx-50) or cy > (sy+50) or cy < (sy-50)) | |
{ | |
Send {Space} | |
mousegetpos, sx, sy ; get new mouse position | |
} | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment