could you please modify the code to make it similar to the one in the 1st post, so it will run totalcommander's process and monitor if it's alive, and if not - then suicide? please, I want this script to be run with total commander and be shut down when total is dead.
The first Post doesn't check such things.
To do so add this lines after "SendMode Input":
Code: Select all
if(not WinExist("ahk_class TTOTAL_CMD")){
run C:\Program Files\totalcmd\totalcmd.exe
}
settimer,CloseTC,1000
return
CloseTC:
if(not WinExist("ahk_class TTOTAL_CMD")){
ExitApp
}
return
+ tell me how to disable showing script icon in the tray?
Add this line at the beginning:
Btw, I've noticed a small half-bug: if scrolling inactive panel too fast - then it sometimes scrolls the active panel, just because the focus doesn't go back in time.
You may try to add delays between the PostMessages: (Play with the values behind "sleep")
Code: Select all
if( panelCheck )
{
PostMessage, 0x433, pane1
sleep,200
PostMessage, 0x433, cmd
sleep,200
PostMessage, 0x433, pane2
sleep,200
}
else
PostMessage, 0x433, cmd
return
And even visually you can see that when you scroll inactive panel it sometimes gets activated. Is it fixable?
No, you have to activate it to make the scrolling possible. Because you can never scroll tabs in inactive panels.
I would suggest to remove this line: "PostMessage, 0x433, pane2"
Then a inactive panel gets active on scrolling its tab. Perhaps this will solve it.
PS: You should learn AHK on your own.