Multiple commands in Change Button Bar?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
moom
Junior Member
Junior Member
Posts: 16
Joined: 2006-02-27, 16:02 UTC

Multiple commands in Change Button Bar?

Post by *moom »

Respected forum members,

Is it possible to configure a "Button Bar"-button in such a way, that it preforms two ore more of the "Total Commander" specific build-in commands, in sequence?

With friendly greetings, M. Moolhuysen.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

moom
Junior Member
Junior Member
Posts: 16
Joined: 2006-02-27, 16:02 UTC

Post by *moom »

I've tested this a bit, it is an interesting tool. Does it support the Total Commander parameters %P, %N, %T, %M, %O, %E in any way?

With friendly greetings, M. Moolhuysen.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Yes, but you have to define user commands to do this.
moom
Junior Member
Junior Member
Posts: 16
Joined: 2006-02-27, 16:02 UTC

Post by *moom »

m^2 wrote:Yes, but you have to define user commands to do this.
I did a forum search, and I think I've found something about it here, but I do not fully understand it.
Do you prehaps know, am I able to find more clear documantation about custom commands somewere?
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

I also did a quick search and I found nothing more :(
What exactly don't you understand / can't do?
moom
Junior Member
Junior Member
Posts: 16
Joined: 2006-02-27, 16:02 UTC

Post by *moom »

When the source file window of Total Commander points to map:
G:\Dir-name1\Dir-name2\Dir-namevar

I want to make the other file window switch to map:
K:\Dir-name3\Dir-name4\Dir-namevar

where G:\Dir-name1\Dir-name2\ and K:\Dir-name3\Dir-name4\ are fixed paths and Dir-namevar is a variable directory name, but for each desired command issue the Dir-namevar name is identical at the end of both paths.

I assume the desired action involves something like this:
- in the source file window, go to the parent directory
- as a result of this, Dir-namevar can be obtained with parameter %N
- somehow combine K:\Dir-name3\Dir-name4\ with %N and switch the other file window to this
- switch source file window back to original

Ofcourse, I'm open to suggestions if someone knows a much better approach.

With friendly greetings, M. Moolhuysen.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

moom wrote:When the source file window of Total Commander points to map:
G:\Dir-name1\Dir-name2\Dir-namevar

I want to make the other file window switch to map:
K:\Dir-name3\Dir-name4\Dir-namevar

where G:\Dir-name1\Dir-name2\ and K:\Dir-name3\Dir-name4\ are fixed paths and Dir-namevar is a variable directory name, but for each desired command issue the Dir-namevar name is identical at the end of both paths.

I assume the desired action involves something like this:
- in the source file window, go to the parent directory
- as a result of this, Dir-namevar can be obtained with parameter %N
- somehow combine K:\Dir-name3\Dir-name4\ with %N and switch the other file window to this
- switch source file window back to original

Ofcourse, I'm open to suggestions if someone knows a much better approach.

With friendly greetings, M. Moolhuysen.
It seems impossible with TCMC - I see no way to get %N from one panel to execute command in another.
Maybe more advanced tools like
TC Script Editor
VBScript
Script Helper ActiveX
will help.
moom
Junior Member
Junior Member
Posts: 16
Joined: 2006-02-27, 16:02 UTC

Post by *moom »

m^2 wrote:It seems impossible with TCMC - I see no way to get %N from one panel to execute command in another.
But it is possible within the same pannel? Then, maybe an alternative approach (other way round) might work:

- issue cm_MatchSrc to duplicate the Source file window into the Target file window
- in the source file window, go to the parent directory
- as a result of this, Dir-namevar can be obtained with parameter %N
- somehow combine K:\Dir-name3\Dir-name4\ with %N and switch the Source file window to this new path
m^2 wrote:Maybe more advanced tools like
TC Script Editor
VBScript
Script Helper ActiveX
will help.
I could (more or less) grasp the readme text of your TCMC tool, but the ones included with these more advaced skript tools are raelly above my level of understanding.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

moom wrote:- somehow combine
I also don't know how.
moom wrote:
m^2 wrote:Maybe more advanced tools like
TC Script Editor
VBScript
Script Helper ActiveX
will help.
I could (more or less) grasp the readme text of your TCMC tool, but the ones included with these more advaced skript tools are raelly above my level of understanding.
I don't use them, sorry.
It seems that a true power-user's help is needed here.
moom
Junior Member
Junior Member
Posts: 16
Joined: 2006-02-27, 16:02 UTC

Post by *moom »

Breaktrough, I've just made an interesting discovery:

In the "Change Buton Bar"-dialoge box of Total Commander, you can enter the fixed path in de "Parameters"-field, by simply typing this path in front of the %P, %N, %T, %M, %O or %E parameter.
I did not know this was the actual, correct spot to make the desired combination. Until now, I've tried to combine in the "Command"-field instead, with no resuld at all, ofcourse.

So, in line with my example:

- behind Command: I now have: TCMC.exe cds ""
- behind Parameters: I now have: K:\Dir-name3\Dir-name4\%N

The "Parameters"-field acts as the second parameter of the "cd"-command from the TCMC tool.
As you see, with this code it really is possible to set the target window, using a parameter obtained from the source window.
This at least, automates the desired action for a significant deal.

I still curous about the "user commands" feature in Total Commander, I would like to find out how these works.
Thank you, M^2 for the mirroring, and helping me along with feedback and pointers.
Post Reply