Long time no see, long time no play batch processing. Post a recently written batch processing for everyone!
xp tested successfully!
[ Last edited by doscc on 2007-1-29 at 02:20 PM ]
xp tested successfully!
Modified on the 29th
Modified code
@echo off & setlocal EnableDelayedExpansion
mode con cols=100 lines=40
title COLOR TIME
call :tnb
set font=█★●◆□◎◇¤⊙〓
:new
rem Main function.
call :rdline
call :gt %time:~0,1% n
call :gt %time:~1,1% m
call :gt %time:~3,1% z
call :gt %time:~4,1% y
color 0%RANDOM:~-1%
set rdfont=!font:~%RANDOM:~-1%,1!
echo %nk% %date%
echo %nk% !%n%1:█=%rdfont%! !%m%1:█=%rdfont%! !%z%1:█=%rdfont%! !%y%1:█=%rdfont%!
echo %nk% !%n%2:█=%rdfont%! !%m%2:█=%rdfont%! !%z%2:█=%rdfont%! !%y%2:█=%rdfont%!
echo %nk% !%n%3:█=%rdfont%! !%m%3:█=%rdfont%! · !%z%3:█=%rdfont%! !%y%3:█=%rdfont%!
echo %nk% !%n%4:█=%rdfont%! !%m%4:█=%rdfont%! !%z%4:█=%rdfont%! !%y%4:█=%rdfont%!
echo %nk% !%n%5:█=%rdfont%! !%m%5:█=%rdfont%! · !%z%5:█=%rdfont%! !%y%5:█=%rdfont%!
echo %nk% www.cn-dos.net DOSCC WINBY.
ping 127.1 -n 3 >NUL
cls
set nk=
goto :new
:rdline
rem Randomly change the number of lines and left-right position.
set /A rdnb=%rdnb% + %RANDOM:~-1%
set /A rdnb=%rdnb% * 2
set /A rdnb=%rdnb% + %RANDOM:~-1%
set /A rdnb=%rdnb% + %RANDOM:~-1%
for /L %%a in (%rdnb% -1 1) do echo.
set rdnb=0
set /A rdnb=%rdnb% + %RANDOM:~-1%
set /A rdnb=%rdnb% + %RANDOM:~-1%
set /A rdnb=%rdnb% * 2
set /A rdnb=%rdnb% + %RANDOM:~-1%
for /L %%a in (1 1 %rdnb%) do set nk=!nk!
set rdnb=0
goto :EOF
:gt
rem Get the time and replace it with a digital appearance.
if "%1"=="n" call :gt 0 n
if "%1"=="0" call set %2=a
if "%1"=="1" call set %2=b
if "%1"=="2" call set %2=c
if "%1"=="3" call set %2=d
if "%1"=="4" call set %2=e
if "%1"=="5" call set %2=f
if "%1"=="6" call set %2=g
if "%1"=="7" call set %2=h
if "%1"=="8" call set %2=i
if "%1"=="9" call set %2=j
goto :EOF
:tnb
rem 0-9 digital appearance.
set a1=█████
set a2=█ █
set a3=█ █
set a4=█ █
set a5=█████
set b1= ██
set b2= █
set b3= █
set b4= █
set b5= █
set c1= ███
set c2= █
set c3=█████
set c4=█
set c5=█████
set d1= ███
set d2= █
set d3=█████
set d4= █
set d5=█████
set e1=█
set e2=█ █
set e3=█████
set e4= █
set e5= █
set f1=███
set f2=█
set f3=█████
set f4= █
set f5=█████
set g1=███
set g2=█
set g3=█████
set g4=█ █
set g5=█████
set h1=█████
set h2=█ █
set h3= █
set h4= █
set h5= █
set i1=█████
set i2=█ █
set i3=█████
set i4=█ █
set i5=█████
set j1=█████
set j2=█ █
set j3=█████
set j4= █
set j5= ████
goto :EOF
Original code
@echo off & setlocal EnableDelayedExpansion
mode con cols=100 lines=40
title COLOR TIME
call :tnb
set font=█★●◆□◎◇¤⊙〓
:new
rem Main function.
call :rdline
call :gt %time:~0,1% n
call :gt %time:~1,1% m
call :gt %time:~3,1% z
call :gt %time:~4,1% y
color 0%RANDOM:~-1%
set rdfont=!font:~%RANDOM:~-1%,1!
echo %nk% %date%
echo %nk% !%n%1:█=%rdfont%! !%m%1:█=%rdfont%! !%z%1:█=%rdfont%! !%y%1:█=%rdfont%!
echo %nk% !%n%2:█=%rdfont%! !%m%2:█=%rdfont%! !%z%2:█=%rdfont%! !%y%2:█=%rdfont%!
echo %nk% !%n%3:█=%rdfont%! !%m%3:█=%rdfont%! · !%z%3:█=%rdfont%! !%y%3:█=%rdfont%!
echo %nk% !%n%4:█=%rdfont%! !%m%4:█=%rdfont%! !%z%4:█=%rdfont%! !%y%4:█=%rdfont%!
echo %nk% !%n%5:█=%rdfont%! !%m%5:█=%rdfont%! · !%z%5:█=%rdfont%! !%y%5:█=%rdfont%!
echo %nk% www.cn-dos.net DOSCC WINBY.
ping 127.1 -n 3 >NUL
cls
set nk=
goto :new
:rdline
rem Randomly change the number of lines and left-right position.
call set /A rdnb=%rdnb% + %RANDOM:~-1%
call set /A rdnb=%rdnb% * 2
call set /A rdnb=%rdnb% + %RANDOM:~-1%
call set /A rdnb=%rdnb% + %RANDOM:~-1%
for /L %%a in (%rdnb% -1 1) do echo.
set rdnb=0
call set /A rdnb=%rdnb% + %RANDOM:~-1%
call set /A rdnb=%rdnb% + %RANDOM:~-1%
call set /A rdnb=%rdnb% * 2
call set /A rdnb=%rdnb% + %RANDOM:~-1%
for /L %%a in (1 1 %rdnb%) do set nk=!nk!
set rdnb=0
goto :EOF
:gt
rem Get the time and replace it with a digital appearance.
set t1=%1
set t2=%2
if "%t1%"=="n" (set t1=0) && set t2=n
if "%t1%"=="0" call set %t2%=a
if "%t1%"=="1" call set %t2%=b
if "%t1%"=="2" call set %t2%=c
if "%t1%"=="3" call set %t2%=d
if "%t1%"=="4" call set %t2%=e
if "%t1%"=="5" call set %t2%=f
if "%t1%"=="6" call set %t2%=g
if "%t1%"=="7" call set %t2%=h
if "%t1%"=="8" call set %t2%=i
if "%t1%"=="9" call set %t2%=j
goto :EOF
:tnb
rem 0-9 digital appearance.
set a1=█████
set a2=█ █
set a3=█ █
set a4=█ █
set a5=█████
set b1= ██
set b2= █
set b3= █
set b4= █
set b5= █
set c1= ███
set c2= █
set c3=█████
set c4=█
set c5=█████
set d1= ███
set d2= █
set d3=█████
set d4= █
set d5=█████
set e1=█
set e2=█ █
set e3=█████
set e4= █
set e5= █
set f1=███
set f2=█
set f3=█████
set f4= █
set f5=█████
set g1=███
set g2=█
set g3=█████
set g4=█ █
set g5=█████
set h1=█████
set h2=█ █
set h3= █
set h4= █
set h5= █
set i1=█████
set i2=█ █
set i3=█████
set i4=█ █
set i5=█████
set j1=█████
set j2=█ █
set j3=█████
set j4= █
set j5= ████
goto :EOF
[ Last edited by doscc on 2007-1-29 at 02:20 PM ]
Recent Ratings for This Post
( 7 in total)
Click for details
