AutoHotkey: Go To Parent Directory When Doubleclicking Border

From TotalcmdWiki
Revision as of 02:44, 1 August 2011 by GammelBert (talk | contribs) (edded else, use #IfWinActive, use Last found Window)
Jump to navigation Jump to search

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.

RegRead, DoubleClickSpeed, HKEY_CURRENT_USER, Control Panel\Mouse, DoubleClickSpeed
If DoubleClickSpeed =
  DoubleClickSpeed = 500

  1. IfWinActive, ahk_class TTOTAL_CMD
~LButton::
  If A_TimeSinceThisHotkey >= %DoubleClickSpeed%
    ClickCount = 0
  MouseGetPos, xcoordinate
  If xcoordinate = 4
  {
    ClickCount++
    PostMessage 1075, 4001 ;use Last Found Window
  }
  else If (xcoordinate = A_ScreenWidth+3)
  {
    ClickCount++
    PostMessage 1075, 4002
  }
  If ClickCount = 2
  {
    PostMessage 1075, 2002
    ClickCount = 0
  }
Return
  1. IfWinActive




Back to AutoHotkey