So I'm trying to create a script that'll scroll left and right while holding the middle mouse button. However, the scroll left and right scrolls regardless if the middle mouse button is held down. It always executes. I need help trying to figure this out.
(I do notice at line 21 there is a bit too much space, ignore that) Code:
; 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