Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Total Commander: Hide to tray
#1
Hello, I'm new with QM and I will really appreciate a help for converting my Autohotkey macro to QM.

My goal is to do CTRL-S and if TC Windows is not active, show it, if TC Windows is active, hide to tray, in this way I can activate or hide TC pressing CTRL-S

Here is my Autohotkey script

PATH_COMMANDER := "C:\totalcmd\TOTALCMD64.EXE"

;--TOTALCOMMANDER
^!s::
Winget, NewPID, ID, ahk_class TTOTAL_CMD
F_HIDE_SHOW("TTOTAL_CMD",PATH_COMMANDER,"Total Commander","TTOTAL_CMD")
return


F_HIDE_SHOW(PRG,PATH,NAME,TRAY)
{
DetectHiddenWindows, On
Winget, WinID, PID, ahk_class %PRG%
DetectHiddenWindows, Off
if (WinID <> "")
{
    {
        If WinActive("ahk_class " . PRG) <> 0
            {
             WinGetTitle, TheWinTitle, ahk_class %PRG%
             menu, tray, Tip, %NAME%
             menu, tray, add, %NAME%, %TRAY%
             WinHide, ahk_class %PRG%
             return
             }
             else
             {
             menu, tray, UseErrorLevel
             menu, tray, Delete, %NAME%
             WinShow, ahk_class %PRG%
             WinActivate, ahk_class %PRG%
             }
            
    }
}
else
{
 Run %PATH%
 WinActivate, ahk_class %PRG%
}
}



Thanks in advance!


Messages In This Thread
Total Commander: Hide to tray - by citytrader - 06-19-2021, 04:25 PM
RE: Total Commander: Hide to tray - by Kevin - 06-19-2021, 10:13 PM
RE: Total Commander: Hide to tray - by citytrader - 06-20-2021, 01:54 AM
RE: Total Commander: Hide to tray - by Kevin - 06-20-2021, 02:10 AM
RE: Total Commander: Hide to tray - by citytrader - 06-20-2021, 02:44 AM
RE: Total Commander: Hide to tray - by Kevin - 06-20-2021, 05:05 AM
RE: Total Commander: Hide to tray - by citytrader - 06-20-2021, 04:04 PM
RE: Total Commander: Hide to tray - by Kevin - 06-20-2021, 07:24 PM
RE: Total Commander: Hide to tray - by citytrader - 06-20-2021, 10:16 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)