FAQs: Button-code: How-to Copy Share Paste a button ('TOTALCMD#BAR#DATA')

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

FAQs: Button-code: How-to Copy Share Paste a button ('TOTALCMD#BAR#DATA')

Post by *Stefan2 »

Did you know already...

you can copy and paste a button or save it as text to a file or exchange it over the forum?



Explanation about "TOTALCMD#BAR#DATA"

That is a formal description for a Total Commander-Button which you can exchange between user by posting it to the forum.


Code: Select all

TOTALCMD#BAR#DATA
cmd /k
?ECHO %P%N %T%M
C:\Windows\system32\cmd.exe
Here a | short explanation | as Tooltip


-1

How to use button code:
COPY:
- Mark the provided code from the forum (everything including 'TOTALCMD#BAR#DATA' and the last digit, here '-1')
- and copy it to the clipboard.
PASTE:
- Perform a right click on the TC button bar at an wanted place.
- Choose 'Paste' from the context menu.

How to share an button code:
- Right click an existing button on the TC button bar and choose 'Copy' from the context menu.
- Paste it to the forum, to a text file for backup, or paste to the TC button bar on another place via context menu.

- - -

Austauschbarer Button-Code:
Anwendung: markiere den Code, kopiere ihn ins Clipboard, dann Rechtsklick auf die TC Buttonbar und wähle "Einfügen".
Exchangeable Button-Code:
How to use: mark that code, copy to clipboard, next right click on TCs Button bar and choose 'Paste'.

- - -


Code Explanation:
Line 1: let TC recognize his own button code
Line 2: the Command
Line 3: the Parameters (a leading '?' will display the command before actual executing) , (*)
Line 4: the path to the Icon file (try 'WCMICONS.DLL' for TCs Icons)
Line 5: the Tool tip
Line 6: the Start path (can (should!) mostly just left empty)
Line 7: start parameter for the command as minimized / maximized (in 'usercmd.ini' this is the 'iconic' option)
Line 8: the number of the internal TC command, if any in line 2, else a '-1' is shown

EXAMPLE button code ("Line 1:" added by me only for education):
Horst.Epp wrote: 2024-03-28, 13:38 UTC I use a button which adds an Admin instance with all tabs and the cursor position preserved.

Code: Select all

Line 1: TOTALCMD#BAR#DATA
Line 2: *%COMMANDER_EXE%  /N /P /A  /i="%COMMANDER_INI%"
Line 3: %Z%X %P%N* %T%M*
Line 4: %COMMANDER_PATH%\TCMADM64.EXE
Line 5: Open New TC as Admin
Line 6: 
Line 7: 0
Line 8: -1

(*) for TC parameters read the TC-Help:

Open a existing button (right click > Change...) and press F1 key to read the help about button parameters.
Click there at the 'magnifying glass' icon to get a list of TC internal commands (or open the 'TOTALCMD.INC' file with F4 key)


Click [Help]-Button or press F1-key or open the TOTALCMD.CHM from TC folder (or subfolder "e").
In CHM go > Operation > User interface > click the "(Button bar)"
> click "Dialog box to change" > read down at "Parameters:" %P %N %X %Y %L %F...
(also read the History.txt and search the forum for the single parameter to learn more about)


- - -

Also see:
> http://www.ghisler.ch/wiki/index.php/Buttonbar
> ts4242s' Button Bar Editor > https://sites.google.com/site/ultratceditors/ultra_tc_editors#buttonbaroverview

- - -

Rearrangement button bar elements
StickyNomad wrote: 2006-01-05, 18:15 UTC by *StickyNomad » Thu Jan 05, 2006 19:15

You can use cut and paste to reorder your buttons:
- right click and cut any button,
- then right click another button and select 'paste'.
The button will be inserted near the destination button.

You can control whether the pasted button should be inserted left/right from the destination button
if you right click near the left/right margin of the destination button.
ghisler(Author) wrote: 2006-01-06, 17:33 UTC by *ghisler(Author) » Fri Jan 06, 2006 18:33
The button bar isn't currently arrangeable via drag&drop to avoid accidental unwanted changes to the button bar.
You can drag&drop buttons in menu "Configuration - button bar", though if you don't want to use copy+paste.

- - -

FAQs: How to create an button
https://ghisler.ch/board/viewtopic.php?f=3&t=50632&p=344803

FAQs: Button-code: How-to Copy Share Paste a button ('TOTALCMD#BAR#DATA')
https://ghisler.ch/board/viewtopic.php?f=3&t=50633&p=335879

FAQs: User-Defined Command (UDC) (usercmd.ini) em_command
https://ghisler.ch/board/viewtopic.php?p=344777#p344777


- - -


Total Commander start menu , "[user]"-menu section in wincmd.ini

menu1=<Description, needed>
cmd1=<Command, needed>
param1=<Parameter, IF need>
path1=<Start path, IF need, default to current active panel>

menu2=<Description>
cmd2=<Command>
param2=<Parameter>
path2=<Start path>

menu3=<Description>
cmd3=<Command>
param3=<Parameter>
path3=<Start path>

. . . . .

menu19=Change Menu to - Englisch (default)
cmd19=OPENLANGUAGEFILE

menu20=Change Menu to - Deutsch (default)
cmd20=OPENLANGUAGEFILE
param20=WCMD_DEU.lng

. . . . .

menu37=call AHK
cmd37=%AppData%\GHISLER\Tools\Autohotkey\AutoHotkey.exe
param37=AutoHotkeyScript.ahk
path37=""%%AppData%%\GHISLER\Tools\Autohotkey\""





 
Post Reply