AutoHotkey: ScrollLock functionality: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 35: | Line 35: | ||
{ | { | ||
if xnDirecton = 1 | if xnDirecton = 1 | ||
Send {Down} | |||
else | else | ||
Send {Up} | |||
ControlGetFocus sActivePanel, A | ControlGetFocus sActivePanel, A | ||
PostMessage 0x115, xnDirecton, 0, %sActivePanel%, A | PostMessage 0x115, xnDirecton, 0, %sActivePanel%, A | ||
Line 43: | Line 43: | ||
Return | Return | ||
} | } | ||
Back to [[AutoHotkey]] | Back to [[AutoHotkey]] |
Revision as of 06:51, 18 June 2005
; Total Commander: ; Scroll without moving the cursor if ScrollLock is turned on. $Down:: TCScroll( 1 ) $Up:: TCScroll( 0 ) TCScroll( xnDirecton ) { GetKeyState, sScrollLockState, ScrollLock, T if (not WinActive( "ahk_class TTOTAL_CMD" )) or (sScrollLockState != "D") { if (xnDirecton = 1) Send {Down} else Send {Up} Return } ControlGetFocus sActivePanel, A PostMessage 0x115, xnDirecton, 0, %sActivePanel%, A Return } ; Scroll, keeping the cursor in place ^+Down:: TCScrollKeep( 1 ) ^+Up:: TCScrollKeep( 0 ) TCScrollKeep( xnDirecton ) { if WinActive( "ahk_class TTOTAL_CMD" ) { if xnDirecton = 1 Send {Down} else Send {Up} ControlGetFocus sActivePanel, A PostMessage 0x115, xnDirecton, 0, %sActivePanel%, A } Return }
Back to AutoHotkey