Jump to content

Button clipboard format

From TotalcmdWiki

The button clipboard format is the clipboard format used by Total Commander when copying and pasting a button in a button bar.

When you copy a button, the clipboard contains a specially formatted text that represents the button's properties. Understanding this format allows you share buttons via plain text, for example on a forum.

Format

The format used for a button on the clipboard is plain text. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the data. The clipboard text consists of multiple lines, each representing a specific property of the button.

Line Description
Line 1 Identifier for button data: TOTALCMD#BAR#DATA
Line 2 Contents of the Command field
Line 3 Contents of the Parameters field
Line 4 Icon file,icon index
Line 5 Contents of the Tooltip field
Line 6 Contents of the Start path field
Line 7 Window state (<empty>: normal, 1: minimized, -1: maximized)
Line 8 Internal command number (-1 if none)

Example clipboard content

TOTALCMD#BAR#DATA
cmd.exe /k dir
/R
%COMMANDER_EXE%,2
Directory listing of d:\, including alternate data streams
d:\
-1
-1