Skip to content

Instantly share code, notes, and snippets.

@TornadoRadon
Last active October 14, 2023 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TornadoRadon/c9d19dfb789a9d68ca56ef5033852fcd to your computer and use it in GitHub Desktop.
Save TornadoRadon/c9d19dfb789a9d68ca56ef5033852fcd to your computer and use it in GitHub Desktop.
Switch your Virtual Desktops with AutoHotKey 2 on Windows by Mouse Wheel when cursor on a corner.
; Desktop Switch Corner by TornadoRadon
; October 14, 2023
#SingleInstance ; Allow only one instance of this script to be running.
Persistent
CoordMode "Mouse" , "Screen" ; Coordinates are relative to the desktop (entire screen).
WheelUp::
{
MouseGetPos &xpos, &ypos
if (xpos = 1919 and ypos = 1079) {
;MsgBox "Mouse Position " xpos ":" ypos
Send "^#{Right}"
} else {
Send "{WheelUp}"
}
}
WheelDown::
{
MouseGetPos &xpos, &ypos
if (xpos = 1919 and ypos = 1079) {
;MsgBox "Mouse Position " xpos ":" ypos
Send "^#{Left}"
} else {
Send "{WheelDown}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment