Skip to content

Instantly share code, notes, and snippets.

@FabianBartl
Last active April 8, 2023 15:44
Show Gist options
  • Save FabianBartl/ee6ce7821e60325993cadfc51c9959f9 to your computer and use it in GitHub Desktop.
Save FabianBartl/ee6ce7821e60325993cadfc51c9959f9 to your computer and use it in GitHub Desktop.
An AHK script to emulate mouse movements and clicks with key combinations.
; Mouse Emulator
; An AHK script to emulate mouse movements and clicks with key combinations.
; # Win
; ^ Control
; ! Alt
; + Shift
; Right click
#LButton::RButton
#BackSpace::RButton
; Left Click
#Enter::LButton
; Vertical scrolling
!#Up::Send {WheelUp 1}
!#Down::Send {WheelDown 1}
; Open Everything Search
#S::Run, "C:\Program Files\Everything\Everything.exe"
; Slow horizontal/vertical movement
+#Left::MouseMove, -5, 0, 0, R
+#Right::MouseMove, 5, 0, 0, R
+#Up::MouseMove, 0, -5, 0, R
+#Down::MouseMove, 0, 5, 0, R
; Normal horizontal/vertical movement
#Left::MouseMove, -30, 0, 0, R
#Right::MouseMove, 30, 0, 0, R
#Up::MouseMove, 0, -30, 0, R
#Down::MouseMove, 0, 30, 0, R
; Fast horizontal/vertical movement
^#Left::MouseMove, -70, 0, 0, R
^#Right::MouseMove, 70, 0, 0, R
^#Up::MouseMove, 0, -70, 0, R
^#Down::MouseMove, 0, 70, 0, R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment