Hold mouse down triggers alt key for Total Commander

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
MaxPower
Posts: 10
Joined: 11 May 2021, 14:31

Hold mouse down triggers alt key for Total Commander

Post by MaxPower » 11 May 2021, 14:49

(AHK current version 1.1.33.09)
Hi, noob/former user here. it's been years since used AHK.
I just need a simple script for Total Commander file/folder move function.

In TC, when you drag a file somewhere, it does not move the file, it copies it. but if you hold alt while dragging, it will move the file. very tedious.
designers of said program refuse to incorporate the normal cut and paste action built into windows explorer.

I need a script that only works when total commander is active.
when I hold the left mouse button down after 1/2 a second, alt is triggered and held down until left mouse is released. well, actually alt is held down with a slight delay after left mouse is released. half second should do. so:

hold left mouse down - 1/2 second later, alt is triggered and held.
release left mouse - 1/2 second later alt is released too
only triggered with said application.
thank you!!
User avatar
mikeyww
Posts: 26877
Joined: 09 Sep 2014, 18:38

Re: Hold mouse down triggers alt key for Total Commander

Post by mikeyww » 11 May 2021, 18:19

It's achievable, but have you considered using F6 to move files? No drag, no hold-- just fast & easy.

Code: Select all

#IfWinActive Total Commander ahk_class TTOTAL_CMD ahk_exe TOTALCMD64.EXE
~LButton::
KeyWait, LButton, T.5
If !ErrorLevel
 Return
SoundBeep, 1500
Send {Alt down}
KeyWait, LButton
Sleep, 500
Send {Alt up}
SoundBeep, 1000
Return
#IfWinActive
User avatar
MaxPower
Posts: 10
Joined: 11 May 2021, 14:31

Re: Hold mouse down triggers alt key for Total Commander

Post by MaxPower » 11 May 2021, 19:08

Works flawlessly, thank you? yes I know of F6 and using a modifier button on my mouse, but this is easier and faster. all my tabs are set up for quick organization. Thank you.
Post Reply

Return to “Ask for Help (v1)”