Created
January 2, 2017 09:37
-
-
Save longtth/3b115992a78b822d67d6cc2e715e5e4d to your computer and use it in GitHub Desktop.
Cuộn ngang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IfWinActive, ahk_class ahk_class XLMAIN | |
LShift & WheelUp::ComObjActive("Excel.Application").ActiveWindow.SmallScroll(0,0,0,1) ; Scroll left. | |
LShift & WheelDown::ComObjActive("Excel.Application").ActiveWindow.SmallScroll(0,0,1) ; Scroll right. | |
#IfWinActive | |
~LShift & WheelUp:: ; Scroll left. | |
ControlGetFocus, fcontrol, A | |
Loop 2 ; <-- Increase this value to scroll faster. | |
SendMessage, 0x114, 0, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINERIGHT. | |
return | |
~LShift & WheelDown:: ; Scroll right. | |
ControlGetFocus, fcontrol, A | |
Loop 2 ; <-- Increase this value to scroll faster. | |
SendMessage, 0x114, 1, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 1 after it is SB_LINELEFT. | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment