Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: ---------------------------------------------------------------------------------------------------------------------------
- :: Displays rainbow text up to 45 chars
- ::
- :: call :init_rainbow
- :: call :rainbow_text "TEXT
- ::
- :: ---------------------------------------------------------------------------------------------------------------------------
- :rainbow_text
- set "str=x%~1" & <nul set /p ".=["
- for %%a in (%rainbow_text%) do (
- set /a "i+=1"
- call set "ex_str=%%str:~!i!,1%%"
- if "!ex_str!" equ "" ( <nul set /p ".=]" & echo. & goto :eof )
- if "!ex_str!" equ " " (
- <nul set /p ".=] ["
- ) else (
- (> colorPrint.txt (echo [!ex_str!]\..\') && findstr /a:0%%a /f:colorPrint.txt ".")
- )
- )
- :init_rainbow
- set "rainbow_text=4 C 6 E 2 A 1 9 3 B 5 D F 7 8 0 4 C 6 E 2 A 1 9 3 B 5 D F 7 8 0 4 C 6 E 2 A 1 9 3 B 5 D F 7 8 0"
- for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E & echo on & for %%b in (1) do rem"') do set "DEL=%%a"
- <nul set /p ".=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%" > "'"
- goto :eof
- :: ---------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement