Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert Totalcmd minimize to tray script from QM to LA
#1
Hello to all, I'm not a programmer and I will really apreciate someone to help me to transform the script done in QM to LA, QM was really easy and now with this change I'm learning!

When I please the hotkey, if Totalcmd is not running, it will start TC, if TC is running and active it will send it to the tray, if TC is in the tray, it will active


/////////////////////////
 On Keypress Ctrl+Alt+s adds tray icon and stays running. If Total Commander if not running runs and exits.
 Sub-function TrayProc is called on mouse events.
str location="E:\D\totalcmd\TOTALCMD64.EXE";; chnage to program location if not the same
int w=win("Total Commander" "TTOTAL_CMD")
if(!w)    
    run location
    ret
int h=hid(w)
if(!h)    
    hid w
    Tray t.AddIcon(location "Show Total Commander" 0 &sub.TrayProc);;change first arguement to pc location if not the same
     MessageLoop
    wait -1
else
    act w
    EndThread +getopt(itemid)

#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
Convert Totalcmd minimize to tray script from QM to LA - by citytrader - Yesterday, 07:05 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)