Interpret buttonbar as menu

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2VadiMGP

Could you explain how to execute internal TC commands from an external program.

EDIT: Found it. :wink:


Executing internal commands from TCMenu doesn't work for me, too.
TCMenu and Totalcmd.inc are inside the TC folder.
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Post by *jinsight »

2VadiMGP

I cannot get a TCMenu bar calling internal TC commands like cm_ExchangeSelection to work.

Here is my setup:

Main Button Bar

[Buttonbar]
Buttoncount=3
button1=F:\Editeur\Editeur.exe
cmd1=F:\Editeur\Editeur.exe
param1=%P%N
path1=F:\Editeur\
menu1=Editeur 5.20
button2=C:\WINDOWS\Notepad-metapad.exe
cmd2=C:\WINDOWS\Notepad-metapad.exe
param2=%P%N
path2=C:\WINDOWS\
menu2=Metapad 3.5
button3=F:\Wincmd\TCmenu.exe
cmd3=F:\Wincmd\TCmenu.exe
param3=F:\Wincmd\NoPar.bar -$
path3=F:\Wincmd\
menu3=TCMenu 1.9 No parameter program list


Button Bar Called by TCMenu
with call to internal Total Commander command

[Buttonbar]
Buttoncount=1
button1=F:\Wincmd\JEGWC32.icl,47
cmd1=cm_ExchangeSelection


TCMenu error message when calling the internal command using TCMenu

"cannot run cm_ExchangeSelection"

All called files, including TotalCmd.inc, are in the
Total Commander directory
Using Win98SE

Thanks for any help.
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

If TCMenu writes "Cannot run cm_xxx" it is means only one: TCmenu was unable to translate cm_xxx into one of internal TC commands.

totalcmd.inc should contain lines like
cm_xxx=nnn;ccc
Check if there no additional spaces or some invisible characters around cm_xxx.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I tried to use a number (2014 for example) instead of a command name, which works fine, when I press the button directly, but not when using TCMenu. Are you sure it's a translation problem?
User avatar
vicray
Junior Member
Junior Member
Posts: 14
Joined: 2003-06-22, 23:13 UTC
Location: Vic, Catalonia, Spain

Post by *vicray »

Just for the record:

cm_ExchangeSelection, cm_countdircontent, cm_ColorConfig ... they all work fine here, both in TCMenu & TCToolbar.

I have Totalcmd.inc copied into TCMenu dir and into TCToolbar dir.

TC 5.51 in XP
-------------
vicray
User avatar
havanna
Member
Member
Posts: 163
Joined: 2003-02-27, 08:06 UTC
Location: Baden/Württemberg

Post by *havanna »

I have assigned some cd... commands to a menu. When I use them as buttonbar, they open in the active window.
When used as TCmenu they always open in the left window.
Is this configuration or design - can it be changed?
Tanstaafl
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

2havanna Yes, this behavior by design. Look at readme.txt:
- Added support for CD command.
Now you can define a commands to change directories according to TC documentation. Only difference from TC behavior is instead of settings directories on source/target panels TCmenu will set directories on left/right panels.
Unfortunately, AFIK it cannot be changed.
Gregory
Junior Member
Junior Member
Posts: 89
Joined: 2003-02-08, 10:04 UTC
Location: Kiev, Ukraine

Post by *Gregory »

VadiMGP wrote: Unfortunately, AFIK it cannot be changed.
You can ask Christian to add support for external call of "cd" command
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

You means "ask to extend support"? ;)
Because external interface exists and allows to set left/right panel only. TCmenu uses this interface.
Gregory
Junior Member
Junior Member
Posts: 89
Joined: 2003-02-08, 10:04 UTC
Location: Kiev, Ukraine

Post by *Gregory »

Yes I know that TC has external interface for changing directories in left and right panels and I think that it should be extended
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Bug report:

TCToolbar doesn't show Windows XP icons correctly. All pixels, that have an alpha value between completely white or completely black are displayed black.
It could be an Imagelist colordepth problem.
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

TCtoolbar 1.4 available.
ftp://ftp1.mgpsoft.com/tctoolbar14.zip
Version 1.4
- Standard toolbar control replaced by own control
- Added bidirectional buttons scrolling.
- Toolbar is shown when mouse outside of TC.
- File TCToolbar.ini can be created in the same directory as TCToolbar.exe
Supported options are:
  • MaxButtons - max number of visible buttons
    ModernStyle - 0/1
    LargeIcons - 0/1 (-$ overrides this option)
    CloseOnEscape - 0/1
PS. Sorry, i forgot to say. All options should be in the [General] section.
Last edited by VadiMGP on 2003-11-05, 22:55 UTC, edited 1 time in total.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

What is the section name of the INI file?
User avatar
Hacker
Moderator
Moderator
Posts: 13067
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

VadiMGP,
I have defined a toolbar, in which only 1 command (out of 5 total) needs the %L parameter. However, when I click any of the 4 that don't need the %L parameter, I get a "No Button Bar Specified", unless the cursor is on a file (or some files are selected). Is there any way this could be fixed?

TIA
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

2Hacker
Can you put here your new TCMenu button definition? "Command" and "Parameters" fields.
Post Reply