I was recently overwhelmed with quick responses for a question I had the other day! hopefully this will be a quick one for those in the know, I've searched and played for hours and just not getting it.
I have found code to modify color per character in batch CMD although cant make it work for ASCII characters.
This shows hows output window with errors:
Here's the code I've tried to modify to suit, it explains exactly whats happening and what im attempting:
@echo off
SETLOCAL EnableDelayedExpansion
for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
set "DEL=%%a"
)
call :colorEcho 0a "This works!!"
echo.
call :colorEcho 0C "But ASCII characters don't"
echo.
echo expect this in set color
echo.
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º º
echo º º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo.
echo but get this instead?
echo.
call :colorEcho 0a "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
echo.
call :colorEcho 0a "º º"
echo.
call :colorEcho 0a "º º"
echo.
call :colorEcho 0a "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
pause
exit
:colorEcho
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1i