通过 AutoHotKey 修复滚动条故障?

通过 AutoHotKey 修复滚动条故障?

如何使用 AHK 修复鼠标滚动条故障?当我向下或向上滚动时,它有时会向相反方向返回一点。我确信 AHK 中有办法解决这个问题,但我不知道该怎么做。

答案1

WheelUp::
WheelDown::
SendInput, {%A_ThisHotkey%} ; remove this line if you don´t want the first tick to be registered 
; Impede scrolling in the opposite direction after the second tick:
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < DllCall("GetDoubleClickTime"))
    SendInput, {%A_ThisHotkey%}  ; or 
    ; SendInput, {%A_ThisHotkey% 2} ; if you want to scroll faster
return

编辑:

也可以尝试:

WheelUp::
If (A_PriorHotKey = WheelDown and A_TimeSincePriorHotkey < 500) ; 500 ms, you can in- or decrease this time.
    SendInput, {WheelUp 2}
else
    SendInput, {WheelUp}
return

WheelDown::
If (A_PriorHotKey = WheelUp and A_TimeSincePriorHotkey < 500)
    SendInput, {WheelDown 2}
else
    SendInput, {WheelDown}
return

相关内容