China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-23 01:38
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Original] COLOR TIME Color Time Screen Saver View 10,224 Replies 47
Floor 31 Posted 2007-02-04 00:46 ·  中国 山西 太原 电信
初级用户
Credits 56
Posts 22
Joined 2006-12-13 10:54
19-year member
UID 73399
Gender Male
Status Offline
Great minds think alike, is this made based on the digital rain from The Matrix?
Floor 32 Posted 2007-02-05 08:57 ·  中国 湖北 宜昌 电信
初级用户
Credits 30
Posts 26
Joined 2006-10-25 12:39
19-year member
UID 68219
Gender Male
Status Offline
Random lines are implemented using blank lines, but how to implement the random positions on the left and right? I don't quite understand some parts. Thank you in advance.
Floor 33 Posted 2007-02-07 04:32 ·  中国 广东 肇庆 四会市 电信
中级用户
★★
Credits 384
Posts 189
Joined 2005-10-19 13:12
20-year member
UID 43709
Gender Male
Status Offline
If the P - starting part is changed to like this, it will be more perfect.

From: http://www.cn-dos.net/forum/viewthread.php?tid=25095&fpage=1


@echo off
mode con cols=15 lines=1
if exist "Temp.bat" goto Main
>Temp.bat echo start/max "" "%~nx0"^&exit
start/max Temp.bat&exit

:Main

@echo off & setlocal EnableDelayedExpansion
mode con cols=125 lines=50


The part in red is the newly added content, and the part in green and bold is the modified content.

Declaration: My resolution is 1024*768.
Floor 34 Posted 2007-02-18 14:24 ·  中国 湖北 黄冈 电信
高级用户
★★★
Credits 894
Posts 411
Joined 2007-02-17 12:15
19-year member
UID 79697
Gender Male
Status Offline
Floor 35 Posted 2007-04-14 09:27 ·  中国 湖北 武汉 电信
初级用户
Credits 41
Posts 22
Joined 2007-04-12 09:29
19-year member
UID 84862
Gender Male
Status Offline
Good stuff, expert
Floor 36 Posted 2007-04-14 09:27 ·  中国 湖北 武汉 电信
初级用户
Credits 41
Posts 22
Joined 2007-04-12 09:29
19-year member
UID 84862
Gender Male
Status Offline
What a great thing, expert
Floor 37 Posted 2008-08-21 20:31 ·  中国 江苏 苏州 电信
初级用户
★★
Credits 133
Posts 75
Joined 2008-08-03 01:08
17-year member
UID 122677
Gender Male
Status Offline
Really envious, I don't know when I can understand more...
Floor 38 Posted 2008-11-03 17:25 ·  中国 北京 电信
新手上路
Credits 5
Posts 4
Joined 2008-10-28 19:53
17-year member
UID 129390
Gender Male
Status Offline
Floor 39 Posted 2008-11-03 20:36 ·  中国 浙江 温州 电信
初级用户
★★
Credits 158
Posts 89
Joined 2007-04-25 08:06
19-year member
UID 86402
Gender Male
Status Offline
Bump
Floor 40 Posted 2008-11-03 20:49 ·  中国 福建 泉州 电信
初级用户
★★
Credits 112
Posts 81
Joined 2008-04-11 23:47
18-year member
UID 115654
Gender Male
Status Offline
What a great thing, expert
CN-DOS批处理室非官方QQ群①:61377162 ②:70174619 ③:75070617
请勿尝试同时加多个群
Floor 41 Posted 2010-06-30 11:35 ·  中国 广东 深圳 电信
新手上路
Credits 5
Posts 6
Joined 2008-11-02 15:33
17-year member
UID 129773
Gender Male
Status Offline
@echo off
echo exit|%ComSpec% /k prompt e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20 $_g$_q$_|debug>nul
chcp 437>nul
graftabl 936>nul
setlocal EnableDelayedExpansion
title COLOR TIME
call :tnb
set spc=
set font==██████████

:new
setlocal
color e%RANDOM:~-1%
set rdfont=!font:~%RANDOM:~-1%,1!
set/a a=%random%%%50,b=%random%%%35
set nk=!spc:~0,%a%!
for /l %%a in (0,1,%b%) do echo.
if "%time:~0,1%"==" " set time=0%time:~1%

echo %nk% %date%
echo %nk% !%time:~0,1%a:█=%rdfont%! !%time:~1,1%a:█=%rdfont%! !%time:~3,1%a:█=%rdfont%! !%time:~4,1%a:█=%rdfont%!
echo %nk% !%time:~0,1%b:█=%rdfont%! !%time:~1,1%b:█=%rdfont%! !%time:~3,1%b:█=%rdfont%! !%time:~4,1%b:█=%rdfont%!
echo %nk% !%time:~0,1%c:█=%rdfont%! !%time:~1,1%c:█=%rdfont%! · !%time:~3,1%c:█=%rdfont%! !%time:~4,1%c:█=%rdfont%!
echo %nk% !%time:~0,1%d:█=%rdfont%! !%time:~1,1%d:█=%rdfont%! !%time:~3,1%d:█=%rdfont%! !%time:~4,1%d:█=%rdfont%!
echo %nk% !%time:~0,1%e:█=%rdfont%! !%time:~1,1%e:█=%rdfont%! · !%time:~3,1%e:█=%rdfont%! !%time:~4,1%e:█=%rdfont%!
echo %nk% www.cn-dos.net DOSCC WINBY.
ping 127.1 -n 3 >NUL
cls
endlocal
goto :new

:tnb
rem 0-9 digit appearance.
set 0a=█████
set 0b=█ █
set 0c=█ █
set 0d=█ █
set 0e=█████

set 1a= ██
set 1b= █
set 1c= █
set 1d= █
set 1e= █

set 2a= ███
set 2b= █
set 2c=█████
set 2d=█
set 2e=█████

set 3a= ███
set 3b= █
set 3c=█████
set 3d= █
set 3e=█████

set 4a=█
set 4b=█ █
set 4c=█████
set 4d= █
set 4e= █

set 5a=███
set 5b=█
set 5c=█████
set 5d= █
set 5e=█████

set 6a=███
set 6b=█
set 6c=█████
set 6d=█ █
set 6e=█████

set 7a=█████
set 7b=█ █
set 7c= █
set 7d= █
set 7e= █

set 8a=█████
set 8b=█ █
set 8c=█████
set 8d=█ █
set 8e=█████

set 9a=█████
set 9b=█ █
set 9c=█████
set 9d= █
set 9e= ████
Floor 42 Posted 2010-06-30 12:44 ·  中国 广东 深圳 电信
中级用户
★★
蝴蝶之吻
Credits 430
Posts 177
Joined 2006-09-20 12:00
19-year member
UID 63170
From 广东深圳
Status Offline
Never goes to the top-left corner, lol.
Floor 43 Posted 2010-06-30 17:34 ·  中国 北京 联通
初级用户
★★
Credits 111
Posts 62
Joined 2008-09-05 21:18
17-year member
UID 124905
Gender Male
From http://ms-dos.cz.cc
Status Offline
I used the ping command inside. I don't know if it will go wrong when running in pure DOS?
Floor 44 Posted 2010-06-30 19:41 ·  中国 北京 联通
初级用户
★★
Credits 111
Posts 62
Joined 2008-09-05 21:18
17-year member
UID 124905
Gender Male
From http://ms-dos.cz.cc
Status Offline
Slightly beautified:


@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%!
ping 127.1 -n 3 >NUL
cls
set nk=
goto :new


:rdline
rem Randomly change the number of lines and left-right positions.
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 numeric 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 numeric 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
Floor 45 Posted 2010-11-25 10:35 ·  中国 云南 昆明 移动
新手上路
Credits 12
Posts 11
Joined 2008-05-09 14:58
18-year member
UID 118231
Gender Male
Status Offline
It's very interesting, learn about functions
Forum Jump: