

LoGiCaL__ wrote:Check out this link:
http://stackoverflow.com/questions/7923948/batch-color-per-line
Edit:
Looks like the colors are off, here's a reference for the Color command:
http://www.computerhope.com/color.htm

WallShadow wrote:LoGiCaL__ wrote:Check out this link:
http://stackoverflow.com/questions/7923948/batch-color-per-line
Edit:
Looks like the colors are off, here's a reference for the Color command:
http://www.computerhope.com/color.htm
dafuq are you saying logical? The first link points to a great resource, +1, I've actually been wanting something like this for a while. The color command changes THE WHOLE DOS PROMPT to your desired color (ie, saying 'color 56' will change the entire command window and all the text in it to an ugly mix of purple and yellow). The only good thing about the color command is that it uses the same color codes as the findstr command that is utilized in the utility you pointed to at first.

@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"
)
echo COLORS!!!
REM 0 is normally black but entering a color with its own background such as '00' or 'AA' or 'FF' will just reset the color to the default because otherwise, you wouldn't be able to read anything
call :ColorText 00 "default"
call :ColorText 01 "blue"
call :ColorText 02 "green"
call :ColorText 03 "aqua"
call :ColorText 04 "red"
call :ColorText 05 "purple"
call :ColorText 06 "yellow"
call :ColorText 07 "white"
ECHO(
call :ColorText 08 "gray"
call :ColorText 09 "lightblue"
call :ColorText 0A "lightgreen"
call :ColorText 0B "lightaqua"
call :ColorText 0C "lightred"
call :ColorText 0D "lightpurple"
call :ColorText 0E "lightyellow"
call :ColorText 0F "brightwhite"
ECHO(
call :ColorText F0 "black on brightwhite"
ECHO(
call :ColorText E1 "blue on lightyellow"
ECHO(
call :ColorText D2 "green on lightpurple"
ECHO(
call :ColorText C3 "aqua on lightred"
ECHO(
call :ColorText B4 "red on lightaqua"
ECHO(
call :ColorText A5 "purple on lightgreen"
ECHO(
call :ColorText 96 "yellow on lightblue"
ECHO(
call :ColorText 87 "white on gray"
ECHO(
ECHO(
ECHO(
call :ColorText 78 "gray on white"
ECHO(
call :ColorText 69 "lightblue on yellow"
ECHO(
call :ColorText 5A "lightgreen on purple"
ECHO(
call :ColorText 4B "lightaqua on red"
ECHO(
call :ColorText 3C "lightred on aqua"
ECHO(
call :ColorText 2D "lightpurple on green"
ECHO(
call :ColorText 1E "lightyellow on blue"
ECHO(
call :ColorText 0F "brightwhite on black"
ECHO(
goto :eof
:ColorText
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
goto :eof

LoGiCaL__ wrote:Edit:
Looks like the colors are off, here's a reference for the Color command:
http://www.computerhope.com/color.htm




Users browsing this forum: No registered users and 0 guests