Mit "Auto Switch Mode" Zielpfad in neuem Tab öffnen

German support forum

Moderators: Hacker, Stefan2, white

Post Reply
phantom
Power Member
Power Member
Posts: 683
Joined: 2003-11-21, 15:34 UTC

Mit "Auto Switch Mode" Zielpfad in neuem Tab öffnen

Post by *phantom »

Es geht hier um den Lösungsvorschlag von @NotNull Teillösung
NotNull wrote: 2021-02-22, 21:34 UTC Eine halbwegs Lösung (mein TC spricht nur English ..) :
  • Menu:Show > Custom View Modes > Configure view modes
  • Add = Tabset1 Master:
    • Tab Color and icon = Gelb
    • Auto-run commands = cm_FocusTrg,cm_OpenNewTab,em_Tabset1_slave,cm_FocusTrg
  • em_Tabset1_slave = cd "c:\path to\slave folder"
  • Add = Tabset1 Slave:
    • Tab Color and icon = Gelb
  • In Auto Switch Mode:
    • Add Rule = Must match C:\path to\Master folder\*
    • Set this mode = Tabset1 Master
    • Add Rule = Must match C:\path to\Slave folder\*
    • Set this mode = Tabset1 Slave
  • Fertig.
Wenn C:\path to\Master folder geöffnet wird, wird gleichzeitig C:\path to\Slave folder ins passive Fenster in eine neue Tab geöffnet. Beide Tabs sind gelb


Es soll sicherlich auch eine Möglichkeit geben in TC um bei schon geöffnete Ordner nich eien neue Tab zu öffnen, aber die existierende Tab zu nutzen. Ich weiß nicht wie, aber ich bin sicher, die Spezialisten hier können mehr darüber sagen.

Hallo @NotNull,

dein Lösungsansatz weist eine gewisse Komplexität auf, daher sind Fehler nicht auszuschließen. Ich habe versucht deine Idee umzusetzen, doch verhält sich der TC bei einem Klick auf dem Tab mit "Master folder" anders als von dir beschrieben. Kannst du dir deine Anleitung nochmal ansehen? Bspw. kommt im "Auto-run commands" der Befehl "cm_FocusTrg" zweimal vor.

Bei mir ist der "Slave folder" ein Unterverzeichnis des "Master folder". Wenn ich den "Master folder" öffne, springt der "Master folder" im aktiven Fenster automatisch zum "Slave folder" und im passiven Fenster wird ein neues Tab ebenfalls mit dem "Slave folder " geöffnet.
NotNull
Senior Member
Senior Member
Posts: 298
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: Mit "Auto Switch Mode" Zielpfad in neuem Tab öffnen

Post by *NotNull »

In English, because I'm not very fluent in German (not my native language)

The instructions are unclear because they had to be written in German. Typically I don't answer questions in the German sub-forum because of that; this was an exception as it was an interesting question/suggestion as well as 6 years old without any solution.

So a (hopefully) better instruction in English, with some improvements too:
  • In the command bar, type cm_CommandBrowser
  • In the left pane, select usercmd.ini (near the bottom)
  • Click the New btton
  • Specify new command = em_Tabset1_slave
  • Press the OK button
  • In the Change user command: box, specify command=cd "c:\path to\slave folder"
  • Press the OK button
  • Back in TC's main window, choose Menu:Show > Custom View Modes > Configure view modes
  • Press the Add button
  • Add new view mode = Tabset1 Master
  • Press the OK button
  • Tab color and icon = Gelb
  • Auto-run commands = cm_FocusTrg,cm_OpenNewTab,em_Tabset1_slave,cm_FocusTrg
    Yes that is correct, cm_FocusTrg is specified twice; what this does is:
    • activate the opposite panel (the 'slave' panel)
    • create a new tab there
    • In that tab, CD to the slave folder (using the em_Tabset1_slave command)
    • Go back to the original panel (the 'master' panel)
  • Press the Apply button
  • Press the Add button
  • Add new view mode = Tabset1 Slave
  • Press the OK button
  • Tab color and icon = Gelb
    (nothing else to configure here)
  • Press the Apply button
  • In the left panel, View Mode is highlighted. Click on Auto Switch Mode
  • Click on the Add button to create a new rule
  • Rule = +: Must Match
  • Directory = C:\path to\Master Folder\
    That is a change to the original post; specifying Master Folder\* would highlight subfolders too
  • Set this mode: = Tabset1 Master
  • Press the Apply button
  • Click on the Add button to create a new rule
  • Rule = +: Must Match
  • Directory = C:\path to\Slave Folder\
    That is a change to the original post; specifying Slave Folder\* would highlight subfolders too
  • Set this mode: = Tabset1 Slave
  • Press the OK button
  • Done! (Hope I didn't forget a step .... )

Still can't find a way to re-use an already opened folder-tab, so you have only 1 Slave-folder tab instead of multiple.
Seems basic functionality to me, so should be configurable somewhere..
Last edited by NotNull on 2021-02-23, 14:41 UTC, edited 1 time in total.
phantom
Power Member
Power Member
Posts: 683
Joined: 2003-11-21, 15:34 UTC

Re: Mit "Auto Switch Mode" Zielpfad in neuem Tab öffnen

Post by *phantom »

@NotNull, thank you very much for the more detailed explanation. It seems that I've made a copy and paste error at auto-run commands. No it works how described.
In the section "Auto Switch mode" for "Master Folder" you have set the wrong "Tabset". It should be called: Set this mode: = Tabset1 Master

Do you think it is also possible that a "click" on the "Slave_folder" Tab open the "Master_folder" Tab?
NotNull
Senior Member
Senior Member
Posts: 298
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: Mit "Auto Switch Mode" Zielpfad in neuem Tab öffnen

Post by *NotNull »

phantom wrote: 2021-02-23, 14:14 UTC In the section "Auto Switch mode" for "Master Folder" you have set the wrong "Tabset". It should be called: Set this mode: = Tabset1 Master
Fixed (copy/paste error). Thanks!
phantom wrote: 2021-02-23, 14:14 UTC Do you think it is also possible that a "click" on the "Slave_folder" Tab open the "Master_folder" Tab?
I don't think so ... Opening the slave folder would then open the master folder, which would trigger to open a slave folder, which would trigger ...
(*very* long story short: that would cause unlimited master folder-tabs and slave folder tabs to be opened, until TC gives up. Would be an interesting experiment, though :D )


At least you have a workaround for now (after 6 years ...). I still think you made a great suggestion that deserves to be honoured.
Post Reply