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.
+ tell me how to disable showing script icon in the tray?
Tab wheel scroll functionality.
Moderators: white, Hacker, petermad, Stefan2
- Samuel
- Power Member
- Posts: 1930
- Joined: 2003-08-29, 15:44 UTC
- Location: Germany, Brandenburg an der Havel
- Contact:
The first Post doesn't check such things.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.
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
Add this line at the beginning:+ tell me how to disable showing script icon in the tray?
Code: Select all
#NoTrayIcon
You may try to add delays between the PostMessages: (Play with the values behind "sleep")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.
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
No, you have to activate it to make the scrolling possible. Because you can never scroll tabs in inactive panels.And even visually you can see that when you scroll inactive panel it sometimes gets activated. Is it fixable?
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.
Re: Tab wheel scroll functionality.
Hi all,
this post is already quite old though it's exactly about what I need too. Hopefully, someone is able to help.
I tried the AHK script on Page 1 from Balderstrom (viewtopic.php?p=189160#p189160) but it didn't do anything. I am Not sure if it's because of a different setup? Mine: Win 10/Tcmd 9.51.
I edited the script a little and it works now except one thing. The scrolling is windows wide. Means, if I use the mouse wheel to scroll through the content of a folder it scrolls through that tabs instead. Is there a way to limit the focus just to the tab bar for browsing through it?
Help is very appreciated
this post is already quite old though it's exactly about what I need too. Hopefully, someone is able to help.
I tried the AHK script on Page 1 from Balderstrom (viewtopic.php?p=189160#p189160) but it didn't do anything. I am Not sure if it's because of a different setup? Mine: Win 10/Tcmd 9.51.
I edited the script a little and it works now except one thing. The scrolling is windows wide. Means, if I use the mouse wheel to scroll through the content of a folder it scrolls through that tabs instead. Is there a way to limit the focus just to the tab bar for browsing through it?
Help is very appreciated
Code: Select all
; https://ghisler.ch/board/viewtopic.php?t=24301
; #NoTrayIcon
#InstallMouseHook
#SingleInstance, Force
SetBatchLInes, -1
SendMode Input
TCTabScroll( key, panelCheck, pane1, pane2 )
{
cmd := (key == "WheelUp" ? 3006 : 3005)
if( panelCheck )
{
PostMessage, 0x433, pane1
PostMessage, 0x433, cmd
PostMessage, 0x433, pane2
}
else
PostMessage, 0x433, cmd
return
}
#ifWinActive, ahk_class TTOTAL_CMD
{
WheelUP::
;WheelRight::
{
ControlGetFocus, aControl, ahk_class TTOTAL_CMD
MouseGetPos, ,,, mControl
if( mControl == "TMyTabControl2" || mControl == "TMyPanel7" ) ; RIGHT
TCTabScroll( A_ThisHotkey, (aControl != "TMyListBox1"), 4002, 4001 )
else
if( mControl == "TMyTabControl1" || mControl == "TMyPanel4" ) ; LEFT
TCTabScroll( A_ThisHotkey, (aControl != "TMyListBox2"), 4001, 4002 )
else
Send, {Ctrl Down}{Tab}{Ctrl Up}
return
}
WheelDown::
;WheelLeft::
{
ControlGetFocus, aControl, ahk_class TTOTAL_CMD
MouseGetPos, ,,, mControl
if( mControl == "TMyTabControl2" || mControl == "TMyPanel7" ) ; RIGHT
TCTabScroll( A_ThisHotkey, (aControl != "TMyListBox1"), 4002, 4001 )
else
if( mControl == "TMyTabControl1" || mControl == "TMyPanel4" ) ; LEFT
TCTabScroll( A_ThisHotkey, (aControl != "TMyListBox2"), 4001, 4002 )
else
Send, {Ctrl Down}{Shift Down}{Tab}{Shift Up}{Ctrl Up}
return
}
return
}