How to mouse scroll through tabs, like in WEB browser?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
dindog
Senior Member
Senior Member
Posts: 316
Joined: 2010-10-18, 07:41 UTC

How to mouse scroll through tabs, like in WEB browser?

Post by *dindog »

when I open 5 or 6 tabs with a little longer folder name, I will have to scroll back and fro to switch to tab I want.

I try mouse scroll like WEB browser like Chrome scroll through tabs, but no reaction. Does TC support that?
User avatar
Dalai
Power Member
Power Member
Posts: 10024
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: mouse scroll on tabs

Post by *Dalai »

dindog wrote:I try mouse scroll like WEB browser like Chrome scroll through tabs, but no reaction. Does TC support that?
Nope. You can try multiline tabs: Options > Display > Folder Tabs > Tabs on multiple lines.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

I try mouse scroll like WEB browser like Chrome scroll through tabs, but no reaction. Does TC support that?
No. TC can't do it by default.
But you can use scripts.

My Autohotkey realization (some code fragments by Balderstrom, YMP etc)

Code: Select all

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; Script: Scroll TC tabs
; Created for TC DreamLair pack
; Version: 1.72
; Created: 2015.04.19
; Script author: LonerD
; Made in Donetsk People's Republic
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#NoEnv
#NoTrayIcon
#KeyHistory, 0
#InstallMouseHook
#SingleInstance, force
SetBatchLInes, -1
SendMode Input
 
#IfWinActive, ahk_class TTOTAL_CMD
{
  WheelDown::
  WheelUp::
  {
    WinGet, TCHWND, ID, A
    ControlGetFocus, aControl, % "ahk_id " TCHWND
    MouseGetPos,,,, mControl
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    SeparateTree := 0
    Loop, 3
    {
      ControlGetText, TMyText%A_Index%, TMyListBox%A_Index%, % "ahk_id " TCHWND
      ControlGetText, LCLText%A_Index%, LCLListBox%A_Index%, % "ahk_id " TCHWND
      if ( TMyText%A_Index% = "W_TreeList2" || LCLText%A_Index% = "W_TreeList2" )
      {
        SeparateTree := 2
        break
      }
      else if ( TMyText%A_Index% = "W_TreeList1" || LCLText%A_Index% = "W_TreeList1" )
        SeparateTree := 1
    }
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    WinGet, TCPID, PID, A
    if ( A_Is64bitOS = 0 )
      TCArch := 32
    else
      TCArch := GetBitness(TCPID)

    EnvGet, commander_path, commander_path
    EnvGet, commander_ini, commander_ini
    IniRead, RedirectLayout, % commander_ini, Layout, RedirectSection, 0
    Transform, LayoutINI, Deref, % (RedirectLayout ? RedirectLayout : commander_ini)
    LayoutINI := ExpandEnvVars (LayoutINI)
    IniRead, DriveCombo, % LayoutINI, Layout, DriveCombo, 1

    TMyTabControl1 := TCArch=32 ? "TMyTabControl1":"SysTabControl321" ; файлова панель з вкладками зліва
    TMyTabControl2 := TCArch=32 ? "TMyTabControl2":"SysTabControl322" ; файлова панель з вкладками справа
    if ( DriveCombo = 0 )
    {
      TDrivePanel2 := TCArch=32 ? "TDrivePanel2":"Window5" ; панель з дисками зліва
      TMyPanel2 := TCArch=32 ? "TMyPanel2":"Window6" ; панель з дисками зліва (розміри)
      TDrivePanel1 := TCArch=32 ? "TDrivePanel1":"Window3" ; панель з дисками справа
      TMyPanel1 := TCArch=32 ? "TMyPanel1":"Window4" ; панель з дисками справа (розміри)
      TMyPanel6 := TCArch=32 ? "TMyPanel6":"Window10" ; файлова панель з вкладками зліва
      TMyPanel7 := TCArch=32 ? "TMyPanel7":"Window11" ; панель статусу зліва
      TMyPanel9 := TCArch=32 ? "TMyPanel9":"Window15" ; файлова панель з вкладками справа
      TMyPanel10 := TCArch=32 ? "TMyPanel10":"Window16" ; панель статусу справа
    }
    else
    {
      TDrivePanel2 := TCArch=32 ? "TDrivePanel2":"Window4" ; панель з дисками зліва
      TMyPanel6 := TCArch=32 ? "TMyPanel6":"Window12" ; панель з дисками зліва
      TDrivePanel1 := TCArch=32 ? "TDrivePanel1":"Window3" ; панель з дисками справа
      TMyPanel9 := TCArch=32 ? "TMyPanel9":"Window17" ; панель з дисками справа
      TMyPanel4 := TCArch=32 ? "TMyPanel4":"Window8" ; файлова панель з вкладками і віконцем диску зліва
      TMyPanel5 := TCArch=32 ? "TMyPanel5":"Window9" ; панель статусу зліва
      TMyPanel7 := TCArch=32 ? "TMyPanel7":"Window13" ; файлова панель з вкладками і віконцем диску справа
      TMyPanel8 := TCArch=32 ? "TMyPanel8":"Window14" ; панель статусу справа
    }
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Loop, 3
      TMyListBox%A_Index% := TCArch=32 ? "TMyListBox" . (SeparateTree + A_Index):"LCLListBox" . (SeparateTree + A_Index)

    WinGet, TCControls, ControlList, % "ahk_id " TCHWND
    TCFTPMode := 0
    Loop, Parse, TCControls, `n, `r
    {
      if ( A_LoopField = TMyListBox3 )
      {
        TCFTPMode := 1
        break
      }
    }

    TMyListBoxL := TCArch=32 ? "TMyListBox" . (2 + SeparateTree + TCFTPMode):"LCLListBox" . (2 + SeparateTree + TCFTPMode)
    TMyListBoxR := TCArch=32 ? "TMyListBox" . (1 + SeparateTree + TCFTPMode):"LCLListBox" . (1 + SeparateTree + TCFTPMode)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    if( mControl = TDrivePanel2 || mControl = TMyPanel2 || mControl = TMyPanel6 || mControl = TMyPanel4 || mControl = TMyPanel5 ) ; || mControl = TMyTabControl1 )
    {
      DllCall("LockWindowUpdate", "uint", TCHWND)
      TCTabScroll( A_ThisHotkey, (aControl != TMyListBoxL), 4001, 4002 )
      DllCall("LockWindowUpdate", "uint", 0)
    }
    else if( mControl = TDrivePanel1 || mControl = TMyPanel1 || mControl = TMyPanel9 || mControl = TMyPanel10 || mControl = TMyPanel8 ) ; || mControl = TMyTabControl2 )
    {
      DllCall("LockWindowUpdate", "uint", TCHWND)
      TCTabScroll( A_ThisHotkey, (aControl != TMyListBoxR), 4002, 4001 )
      DllCall("LockWindowUpdate", "uint", 0)
    }
    else if( mControl = TMyPanel7 )
    {
      DllCall("LockWindowUpdate", "uint", TCHWND)
      if ( DriveCombo = 0 )
        TCTabScroll( A_ThisHotkey, (aControl != TMyListBoxL), 4001, 4002 )
      else
        TCTabScroll( A_ThisHotkey, (aControl != TMyListBoxR), 4002, 4001 )
      DllCall("LockWindowUpdate", "uint", 0)
    }
    else
      Send, {%A_ThisHotkey%}
    Return
  }
Return
}
#IfWinActive
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TCTabScroll( key, panelCheck, pane1, pane2 )
{
  cmd := (key == "WheelUp" ? 3006 : 3005)
  if( panelCheck )
  {
    PostMessage, 0x433, pane1
    Sleep, 50
    PostMessage, 0x433, cmd
    PostMessage, 0x433, pane2
  }
  else
    PostMessage, 0x433, cmd
  Sleep, 100
  Return
}
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GetBitness(Process) {
  Process, Exist, %Process%
  If !(PID := ErrorLevel)
    return 0
  hProcess := DllCall("OpenProcess", "uint", 0x400
                                   , "uint", 0, "uint", PID, "ptr")
  If (hProcess = 0)
    return 0
  res := DllCall("IsWow64Process", "ptr", hProcess, "int *", Wow64Process)
  If (res = 0)
    return 0
  DllCall("CloseHandle", "ptr", hProcess)
  return Wow64Process? 32:64
}
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ExpandEnvVars(ppath)
{
  VarSetCapacity(Dest, 2000)
  DllCall("ExpandEnvironmentStrings", Str, ppath, Str, Dest, Int, 1998)
  Return, Dest
}
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Post Reply