Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Total Commander: Hide to tray
#2
This should cover it
Function TotalCommanderHideShowWithTrayIcon
Trigger Cs     Help - how to add the trigger to the macro
Code:
Copy      Help
;On Keypress Ctrl+s adds tray icon and stays running. If Total Commander if not running runs and exits.
;Sub-function TrayProc is called on mouse events.

int w=win("Total Commander" "TTOTAL_CMD")
if(!w)
,run "C:\Program Files\totalcmd\TOTALCMD64.EXE";; change to location on your pc if not this
,ret
int h=hid(w)
if(!h)    
,hid w
,Tray t.AddIcon("C:\Program Files\totalcmd\TOTALCMD64.EXE" "Show Total Commander" 0 &sub.TrayProc)
,MessageLoop
else
,EndThread +getopt(itemid)
,act w
,ret

#sub TrayProc v
function Tray&tray msg

sel msg
,case WM_LBUTTONUP
,sel GetMod
,,case 0 ;;left click on icon
,,act w
,,shutdown -7
,,case 2 ;;control +left click on icon
,,act w
,,shutdown -7


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)