TotalMouseEx -Additional mouse functions for Total Commander

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, sheep, Hacker, Stefan2

Post Reply
User avatar
ZeLen1y
Junior Member
Junior Member
Posts: 35
Joined: 2009-06-27, 09:05 UTC

TotalMouseEx -Additional mouse functions for Total Commander

Post by *ZeLen1y »

TotalMouseEx v0.7 -Additional mouse functions for Total Commander:
Long press left button > View file in Lister
Long press middle button > Edit file
Double click middle button > Select files with same ext.

Download executable & source:
https://www.dropbox.com/s/jm0wmz1w751t5st/TotalMouseEX.7z

Source (AutoHotkey_L v1.1.1.00 Unicode):

Code: Select all

#Persistent
#SingleInstance force

SetKeyDelay, -1
SetWinDelay, -1
SetBatchLines, -1

Prj := "TotalMouseEX v0.7 by zL"

Tray:
  Menu, Tray, NoStandard
  Menu, Tray, DeleteAll
  Menu, Tray, Tip, % Prj
  IfEqual, A_IsCompiled,, Menu, Tray, Icon, % (FileExist(A_ScriptDir "\TotalMouseEX.ico") ? A_ScriptDir "\TotalMouseEX.ico" : "main.cpl")
  RegRead, Startup, HKCU, Software\Microsoft\Windows\CurrentVersion\Run, TotalMouseEX
  Menu, Tray, Add, &About, About
  Menu, Tray, Add, &Start with Windows, Startup
  Menu, Tray, % (Startup ? "" : "Un") "Check", &Start with Windows
  Menu, Tray, Add
  Menu, Tray, Add, E&xit, Quit
  Menu, Tray, Default, &About
Return

About:
  MsgBox 8256, % Prj,
  (LTrim
    Additional mouse functions for Total Commander:
    - Long press left button > View file in Lister
    - Long press middle button > Edit file
    - Double click middle button > Select files with same ext.
  )
Return

Startup:
  IfEqual, Startup,, RegWrite, REG_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Run, TotalMouseEX, % A_ScriptFullPath
  Else, RegDelete, HKCU, Software\Microsoft\Windows\CurrentVersion\Run, TotalMouseEX
  Gosub, Tray
Return

Quit:
ExitApp

#If WinActive("ahk_class TTOTAL_CMD") and MouseUnder("(TMy|LCL)ListBox[123]")

~LButton::
MButton::
  StringReplace, Button, A_ThisHotkey, ~
  If %Button%Press
  { %Button%Press += 1
    Return
  }
  %Button%Press = 1
  SetTimer, %Button%Press, -250
Return

LButtonPress:
  IfEqual, LButtonPress, 1
  { MouseGetPos, x0, y0
    KeyWait, LButton, T0.4
    MouseGetPos, x1, y1
    If (ErrorLevel && WinActive("ahk_class TTOTAL_CMD") && (x0 = x1 && y0 = y1))
      Send, {Click}{F3}
  }
  LButtonPress = 0
Return

MButtonPress:
  IfEqual, MButtonPress, 1
  { MouseGetPos, x0, y0
    KeyWait, MButton, T0.4
    MouseGetPos, x1, y1
    If (ErrorLevel && WinActive("ahk_class TTOTAL_CMD") && (x0 = x1 && y0 = y1))
      Send, {Click}{F4}
    Else, Send, {MButton}
  }
  Else, IfEqual, MButtonPress, 2, Send, {Click}!{NumpadAdd}
  MButtonPress = 0
Return

MouseUnder(Controls) {
  MouseGetPos,,,, Control
  If RegExMatch(Control, Controls)
    Return, True
}
TW
Senior Member
Senior Member
Posts: 364
Joined: 2005-01-19, 13:35 UTC

Post by *TW »

thanks, it works for me.

very handy in some cases.
licenced and happy TC user since 1994 (#11xx)
Post Reply