Batch: Color Choice Menu

December 14, 2010 at 06:40:22
Specs: Windows XP
hey i would like to know how to make a menu so you can choose what color of text and/or background you want for cmd. if you could help that would be greaqt thanks.

See More: Batch: Color Choice Menu

Report •


#1
December 14, 2010 at 06:56:36
@echo off
echo.
color /?
echo.
set /p INPUT= Enter a colour number :
%INPUT%
echo.
pause
exit

Happy is ONE who says I am an OttoMAN.


Report •

#2
December 14, 2010 at 07:07:07
@echo off

:menu
cls
echo.                     Please enter a two letter code:
echo.
echo.       The first letter is the background, the second is the text color.
echo.
echo.
echo.                (0) = Black                 (8) = Gray
echo.                (1) = Blue                  (9) = Light Blue
echo.                (2) = Green                 (A) = Light Green
echo.                (3) = Aqua                  (B) = Light Aqua
echo.                (4) = Red                   (C) = Light Red
echo.                (5) = Purple                (D) = Light Purple
echo.                (6) = Yellow                (E) = Light Yellow
echo.                (7) = White                 (F) = Bright White
echo.
echo.
echo.
echo.                       The two colors can't be the same.
echo.
echo.
set /p color=Input here ^>^>^>

if not defined color goto menu
for /f "delims=0123456789abcdefABCDEF " %%a in ("%color:"=%") do goto menu
set color=%color:"=%
set color=%color: =%
if "%color:~1%"=="" goto menu
if not "%color:~2%"=="" goto menu
if "%color:~0,1%"=="%color:~1%" goto menu
color %color%
pause


Report •

#3
December 15, 2010 at 04:38:54
You beat me.

Happy is ONE who says I am an OttoMAN.


Report •

Related Solutions

#4
December 15, 2010 at 07:34:39
I win the internets!

Yay! ;)


Report •

#5
December 15, 2010 at 22:56:01
I should also note that I used this to make the menu and then touched it up manually afterwards.

http://judago.webs.com/downloads.ht...


Report •

#6
December 24, 2010 at 10:09:06
thank you for your help guys.

Report •

Ask Question