Skip to content

Instantly share code, notes, and snippets.

@qbikez
Created February 4, 2016 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qbikez/997a6a669d9c34c0a09a to your computer and use it in GitHub Desktop.
Save qbikez/997a6a669d9c34c0a09a to your computer and use it in GitHub Desktop.
echo off
REM 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 say the name of the colors, don't read
call :ColorText 0a "blue"
call :ColorText 0C "green"
call :ColorText 0b "red"
echo(
call :ColorText 19 "yellow"
call :ColorText 2F "black"
call :ColorText 4e "white"
goto :eof
:ColorText
echo off
<nul set /p ".=%DEL%" > "%~2"
findstr /v /a:%1 /R "^$" "%~2" nul
del "%~2" > nul 2>&1
goto :eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment