AutoHotkey: Go To Parent Directory When Doubleclicking Border: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
(edded else, use #IfWinActive, use Last found Window)
(Undo revision 7334 by GammelBert (Talk))
 
Line 5: Line 5:
   DoubleClickSpeed = 500
   DoubleClickSpeed = 500
   
   
#IfWinActive, ahk_class TTOTAL_CMD
  ~LButton::
  ~LButton::
 
IfWinActive, ahk_class TTOTAL_CMD
{
   If A_TimeSinceThisHotkey >= %DoubleClickSpeed%
   If A_TimeSinceThisHotkey >= %DoubleClickSpeed%
     ClickCount = 0
     ClickCount = 0
Line 14: Line 14:
   {
   {
     ClickCount++
     ClickCount++
     PostMessage 1075, 4001 ;use Last Found Window
     PostMessage 1075, 4001, , , ahk_class TTOTAL_CMD
   }
   }
   else If (xcoordinate = A_ScreenWidth+3)
   If (xcoordinate = A_ScreenWidth+3)
   {
   {
     ClickCount++
     ClickCount++
     PostMessage 1075, 4002
     PostMessage 1075, 4002, , , ahk_class TTOTAL_CMD
   }
   }
   If ClickCount = 2
   If ClickCount = 2
   {
   {
     PostMessage 1075, 2002
     PostMessage 1075, 2002, , , ahk_class TTOTAL_CMD
     ClickCount = 0
     ClickCount = 0
   }
   }
 
}
  Return
  Return
#IfWinActive


<BR>
<BR>

Latest revision as of 02:45, 1 August 2011

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

~LButton::
IfWinActive, ahk_class TTOTAL_CMD
{
  If A_TimeSinceThisHotkey >= %DoubleClickSpeed%
    ClickCount = 0
  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
    ClickCount = 0
  }
}
Return




Back to AutoHotkey