+WheelUp:: ; Scroll left. SetTitleMatchMode, 2 IfWinActive, Microsoft Excel - { SetScrollLockState, on send,{left} SetScrollLockState, off } else IfWinActive, Adobe Acrobat Professional - { send,+{left} } else IfWinActive, - Mozilla Firefox { Loop 4 send,{left} } else { ControlGetFocus, FocusedControl, A Loop 4 SendMessage, 0x114, 0, 0, %FocusedControl%, A ; 0x114 is WM_HSCROLL ; 1 vs. 0 causes SB_LINEDOWN vs. UP } return +WheelDown:: ; Scroll right. SetTitleMatchMode, 2 IfWinActive, Microsoft Excel - { SetScrollLockState, on send,{right} SetScrollLockState, off } else IfWinActive, Adobe Acrobat Professional - { send,+{right} } else IfWinActive, - Mozilla Firefox { Loop 4 send,{right} } else { ControlGetFocus, FocusedControl, A Loop 4 SendMessage, 0x114, 1, 0, %FocusedControl%, A ; 0x114 is WM_HSCROLL ; 1 vs. 0 causes SB_LINEDOWN vs. UP } return