[code=BatchFile]@echo off echo Name : ColorFont.bat echo Version: 1.2 (2007-08-08) echo, echo Please wait for a moment.
set SourceFile=%~dp0ColorSource.txt set TargetFile=%~dp0ColorTarget.txt
if not exist %SourceFile% ( goto :err ) if exist %TargetFile% ( del %TargetFile% )
set c1= set c2=[color=#FF3300] set c3=[color=#FF6600] set c4=[color=#FF9900] set c5=[color=#FFCC00] set c6=[color=#FFFF00] set c7=[color=#CCFF00] set c8=[color=#99FF00] set c9=[color=#66FF00] set c10=[color=#33FF00] set c11=[color=#00FF00] set c12=[color=#00FF33] set c13=[color=#00FF66] set c14=[color=#00FF99] set c15=[color=#00FFCC] set c16=[color=#00FFFF] set c17=[color=#00CCFF] set c18=[color=#0099FF] set c19=[color=#0066FF] set c20=[color=#0033FF] set c21=[color=#0000FF] set c22=[color=#3300FF] set c23=[color=#6600FF] set c24=[color=#9900FF] set c25=[color=#CC00FF] set c26=[color=#FF00FF] set c27=[color=#FF00CC] set c28=[color=#FF0099] set c29=[color=#FF0066] set c30=[color=#FF0033]
setlocal enabledelayedexpansion (for /f "delims=" %%a in ('findstr /n .* %SourceFile%') do ( set "str=%%a" set str=!str:*:=! set t= call :break ))>%TargetFile% endlocal goto :eof
:break if defined str ( set /a i+=1 if !i! equ 31 ( set i=1 ) set t=!t!%%c!i!%%!str:~0,1! set str=!str:~1! goto :break ) call echo,!t! goto :eof