参考来源:
https://zhidao.baidu.com/question/182311261665020644.html
https://www.jianshu.com/p/d8af4e7bfbae
https://blog.csdn.net/weixin_42848594/article/details/81626967
操作:
新建txt文件
粘贴代码
将其保存为.bat格式,
双击运行就可以了
1.
@echo off :: Code by hxuan999 2006-11-12 CMD@XP :: http://www.cn-dos.net/forum/viewthread.php?tid=24418 setlocal ENABLEDELAYEDEXPANSION color 02 for /l %%i in (1,1,80) do ( set Down%%i=0 ) :loop for /l %%j in (1,1,80) do ( set /a Down%%j-=1 if !down%%j! LSS 0 ( set /a Arrow%%j=!random!%%4 set /a Down%%j=!random!%%15+10 ) if "!Arrow%%j!" == "1" ( set /a chr=!random!%%2 set /p=!chr!<NUL ) else ( set /p= <NUL ) ) goto loop goto :eof
效果:
2.
@echo off
title digitalrain
color 0b
setlocal ENABLEDELAYEDEXPANSION
for /l %%i in (0) do (
set "line="
for /l %%j in (1,1,80) do (
set /a Down%%j-=2
set "x=!Down%%j!"
if !x! LSS 0 (
set /a Arrow%%j=!random!%%3
set /a Down%%j=!random!%%15+10
)
set "x=!Arrow%%j!"
if "!x!" == "2" (
set "line=!line!!random:~-1! "
) else (set "line=!line! ")
)
set /p=!line!<nul
)
效果:
3.
@echo off
color 02
:start
echo %random% %random% %random% %rangom% %random% %random% %rangom% %random% %random% %random% %random% %rangom% %rangom%
goto start
效果: