AutoHotkey: ScrollLock functionality

From TotalcmdWiki
Revision as of 18:06, 16 June 2005 by SanskritFritz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
; 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
}


Back to AutoHotkey