Yesterday, 07:05 PM
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
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