Skip to content

Instantly share code, notes, and snippets.

@fm3
Last active December 2, 2017 23:28
Show Gist options
  • Save fm3/e3d9f13dd368ec91b352071ba7ecb642 to your computer and use it in GitHub Desktop.
Save fm3/e3d9f13dd368ec91b352071ba7ecb642 to your computer and use it in GitHub Desktop.
Firefox: Tab Wheel Scroll using AutoHotkey for Windows
#MaxHotkeysPerInterval 200
shouldFire()
{
CoordMode, Mouse, Screen
MouseGetPos, mouseX, mouseY, MouseHoverWin
WinGetPos, winX, winY, width, height, ahk_id %MouseHoverWin%
WinGetClass, class, ahk_id %MouseHoverWin%
if (mouseY - winY >= 0 && mouseY - winY < 40 && class == "MozillaWindowClass") {
return 1
}
}
#If, shouldFire()
WheelUp::
MouseGetPos, mouseX, mouseY, MouseHoverWin
ControlSend,, {ctrl down}{shift down}{Tab}{ctrl up}{shift up}, ahk_id %MouseHoverWin%
return
WheelDown::
MouseGetPos, mouseX, mouseY, MouseHoverWin
ControlSend,, {ctrl down}{Tab}{shift up}, ahk_id %MouseHoverWin%
return
#If
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment