所以我正在尝试创建一个在按住鼠标中键的同时左右滚动的脚本。但是,无论是否按住鼠标中键,左右滚动都会滚动。它总是执行。我需要帮助来解决这个问题。
(我确实注意到第 21 行有太多空间,请忽略)代码:
; Hold the scroll wheel and scroll to scroll horizontally
; Scroll up = left, scroll down = right
#NoEnv
;#InstallMouseHook
#HotkeyInterval 1
#MaxHotkeysPerInterval 1000000 ; Prevents the popup when scrolling too fast
GetKeyState, ScrollState, MButton
if(ScrollState = U)
{
;return
}
else if(ScrollState = D)
{
WheelUp::Send {WheelLeft}
return
WheelDown:: Send {WheelRight}
return
}
return