Last active
January 9, 2020 00:52
-
-
Save Chematronix/41baad7d38b43e2f7deed6d9691a25a7 to your computer and use it in GitHub Desktop.
Switch between running programs with the flick of a finger: press down the Right Mouse Button and turn the mouse wheel.
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
; ---------------------------------------------------- ; | |
; Alt-Tab on Wheels (with Mouse RClick + Wheel) ; | |
; ---------------------------------------------------- ; | |
; Switch between running programs with the flick of a | |
; finger: press down the Right Mouse Button and turn | |
; the mouse wheel. | |
; | |
; Install https://www.autohotkey.com/ (Windows only) to run. | |
; To auto-start, copy the script or a shortcut to your | |
; Start Menu\Programs\Startup directory | |
; (%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup | |
; Key or button to enable alt-tabing with the wheel. | |
; RButton (Right Mouse Click) by default. | |
altTabOnWheelsModifier := "RButton" | |
VERSION := 1.0 | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. | |
#SingleInstance force ; Determines whether a script is allowed to run again when it is already running. | |
#UseHook On ; Using the keyboard hook is usually preferred for hotkeys - but here we only need the mouse hook. | |
#InstallMouseHook | |
#MaxHotkeysPerInterval 1000 ; Avoids warning messages for high speed wheel users. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
Menu, Tray, Tip, Alt-TabOnWheels %VERSION% | |
Menu, Tray, Icon, imageres.dll, 262 | |
; Register altTabOnWheelsModifier + Wheel actions | |
Hotkey, %altTabOnWheelsModifier% & WheelUp, ShiftAltTab | |
Hotkey, %altTabOnWheelsModifier% & WheelDown, AltTab | |
; Enable altTabOnWheelsModifier when clicked by itself | |
Hotkey, %altTabOnWheelsModifier%, SendThisHotkey | |
SendThisHotkey: | |
Send {%A_ThisHotkey%} | |
Return | |
;Things were so simple, back in the time... | |
;RButton & WheelDown::AltTab | |
;RButton & WheelUp::ShiftAltTab | |
;RButton::Send {%A_ThisHotkey%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment