Ok, these additional explanations may help. This is the description of Show.exe command:
on Show.exe description Aacini wrote:
Show characters from Ascii codes, string literals and Batch variables.
Show code[*times] | "literal" | variable[:[±]wide] ...
<code>, <times> and <wide> must be decimal numbers up to 255 each.
Times repeat the previous Ascii code character that number of times.
Wide define a width to show the variable value: justified at left, or justified at rigth if <wide> have minus sign, or centered if <wide> have plus sign.
At end, the number of displayed characters is returned in ERRORLEVEL.
Show "Result one: " Num1 9 9 "Result two: " Num2 13 10 "Next line" 13 10
In previous example Num1 and Num2 are variables, "Next line" is a literal string and 9, 13 and 10 are Ascii codes representing TAB, CR and LF control chars, respectively.
If an Ascii code is followed by an asterisk and counter, the character is repeated that number of times. For example, the Batch subroutine below show a frame in the screen given the width and height:
:ShowFrame width height
set /A width=%1-2, height=%2-2
Show 218 196*%width% 191 13 10
for /L %%i in (1,1,%height%) do Show 179 32*%width% 179 13 10
Show 192 196*%width% 217 13 10
In this example the %width% variable must be necessarily expanded because the description of Show.exe program indicate that "<code>, <times> and <wide> must be decimal numbers up to 255 each". The CR and LF variables defined in my previous reply must not
be expanded because then they interfere with the parsing of cmd.exe (unless they are enclosed in quotes).
About the color variables you mentioned, in the same post that includes 9-Ascii.exe.hex, 10-CursorSize.exe.hex, 11-TextColor.exe.hex and 12-ColorShow.exe.hex, immediately before TextColor.exe program this example appears:
before 11-TextColor.exe.hex Aacini wrote:
The following Batch subroutine define several values useful to write color attributes:
for %%c in ( Black Blue Green Aqua Red Purple Brown White
Grey LBlue LGreen LAqua LRed LPurple Yellow BWhite ) do (
set /A c+=1
for %%C in (!c!) do set %%c=!HexDigit:~%%C,1!
Although the first example of TextColor use these variables with no previous explanation that the DefineColorCodes subroutine must be previously called:
... such subroutine and its variables appears just one page
above this example.
This topic is extensive, so I tried to not include superfluous data that just made it even larger. Most of the small examples does not include the initial lines of a Batch file that may even avoid they works, like "setlocal". In despite of this detail, if you read complete replies
you should have not problems knowing what are the values/switches/subroutines/etc. that should be included in each case. As a matter of fact, this is the reason because each reply is relatively big and include several programs: each reply comprise a sub-theme that must be entirely read as a unit.