Skip to content

Instantly share code, notes, and snippets.

@KnIfER
Created April 12, 2023 10:07
Show Gist options
  • Save KnIfER/7d94252d8432b3524bf257554ca553b1 to your computer and use it in GitHub Desktop.
Save KnIfER/7d94252d8432b3524bf257554ca553b1 to your computer and use it in GitHub Desktop.
ahk how to make scrollbar drag more easily by middle button down.
#IfWinActive ahk_exe chrome.exe
$MButton::
MouseGetPos, xpos, ypos
WinGetPos,x,y,w,h
if (xpos<w && xpos >= w-30 && ypos>0 && ypos<h) {
global tmp:=1
Send +{LButton down}
}
else MouseClick, M
return
$MButton up::
global tmp
if(tmp=1) {
Send +{LButton up}
tmp:=0
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment