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

From TotalcmdWiki
Jump to navigation Jump to search
mNo edit summary
(Undo revision 7334 by GammelBert (Talk))
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
; 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.
; Version 1.1: Sluggish responsiveness corrected, now doubleclick speed is read from registry
 
; 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
  RegRead, DoubleClickSpeed, HKEY_CURRENT_USER, Control Panel\Mouse, DoubleClickSpeed
  If DoubleClickSpeed =
  If DoubleClickSpeed =
Line 10: Line 6:
   
   
  ~LButton::
  ~LButton::
  If WinNotActive, ahk_class TTOTAL_CMD
  IfWinActive, ahk_class TTOTAL_CMD
  Return
If A_TimeSincePriorHotkey >= %DoubleClickSpeed%
  ClickCount = 0
MouseGetPos, xcoordinate
If xcoordinate = 4
  {
  {
   ClickCount++
   If A_TimeSinceThisHotkey >= %DoubleClickSpeed%
  PostMessage 1075, 4001, , , ahk_class TTOTAL_CMD
    ClickCount = 0
}
  MouseGetPos, xcoordinate
If (xcoordinate = A_ScreenWidth+3)
  If xcoordinate = 4
{
  {
  ClickCount++
    ClickCount++
  PostMessage 1075, 4002, , , ahk_class TTOTAL_CMD
    PostMessage 1075, 4001, , , ahk_class TTOTAL_CMD
}
  }
If ClickCount = 2
  If (xcoordinate = A_ScreenWidth+3)
{
  {
  PostMessage 1075, 2002, , , ahk_class TTOTAL_CMD
    ClickCount++
  ClickCount = 0
    PostMessage 1075, 4002, , , ahk_class TTOTAL_CMD
  }
  If ClickCount = 2
  {
    PostMessage 1075, 2002, , , ahk_class TTOTAL_CMD
    ClickCount = 0
  }
  }
  }
Return
<BR>
----
<BR> Back to [[AutoHotkey]]<BR>




Back to [[AutoHotkey]]
[[Category:AutoHotkey scripts|Go To Parent Directory When Doubleclicking Border]]
[[de:AutoHotkey: Mit Doppelklick auf den Bildschirmrand ins übergeordnete Verzeichnis wechseln]]

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