AutoHotkey: Go To Parent Directory When Doubleclicking Border

From TotalcmdWiki
Revision as of 08:43, 6 June 2005 by Icfu (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
; Script name: GoToParent.ahk

; Doubleclicking the left/right border when TC is maximized enters the corresponding parent directory.
; A neat side effect is that single clicking a border already activates the panel.

; Adjust the DoubleClickInterval, 500 (time in milliseconds) to your needs.

SetBatchLines, -1
WinWaitActive, ahk_class TTOTAL_CMD
SetTimer, DoubleClickInterval, 500

~LButton::
ResetClickCount = false
MouseGetPos, xcoordinate
If xcoordinate=4
{
    ClickCount++
    PostMessage 1075, 4001, , , ahk_class TTOTAL_CMD
}
If (xcoordinate=A_ScreenWidth+3)
{
    ClickCount++
    PostMessage 1075, 4002, , , ahk_class TTOTAL_CMD
}
If ClickCount >=2
    PostMessage 1075, 2002, , , ahk_class TTOTAL_CMD
ResetClickCount = true
Return

DoubleClickInterval:
If ResetClickCount = true
    ClickCount = 0
Return

Back to AutoHotkey