|
网上学习了些批处理命令,也能做出些程序哦。
mode con cols=宽度 lines=高度 (这是设置改变CMD窗口大小的命令)
color,后跟背景色和前景色的16进制代码 (这是设置改变CMD窗口颜色的命令)
ping -n 数字 127.1>nul (这个是让程序停顿一段时间的命令,"数字"设置越大停顿的时间越长)
让程序执行结果不显示:在程序最后加上>nul,为了格式规范,应该在>前后各加一个空格
for语句是重复一段程序的执行
下面是代码:
@echo off
mode con cols=71 lines=9
for /l %%a in (1,1,8) do (
echo/
echo\
echo.
echo **********************************************************************
echo *************************篮球飞人火爆版*******************************
echo **********************************************************************
color cf
ping -n 1 127.1>nul
color fc
ping -n 1 127.1>nul
cls
)
color f1
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo ^|
echo o ^|
echo /^|\o ^|
echo _____________/_\____________________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo ^|
echo o ^|
echo /^|\ ^|
echo ________________/_^>_o_______________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo ^|
echo o ^|
echo /^|\o ^|
echo ______________________^>_\___________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo ^|
echo o ^|
echo /^|\ ^|
echo ______________________/_^>_o_________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo ^|
echo o ^|
echo /^|-o ^|
echo __________________________^>\________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo ^|
echo o ^|
echo /^|\ ^|
echo ____________________________/_^>_o___________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo 罚球线到了! =^|--^|
echo V' ^|
echo ^|
echo o ^|
echo /^|-o ^|
echo ________________________________^>^>__________________________________^|
ping -n 2 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo o V' ^|
echo o/ ^|
echo /^| ^|
echo ^>\ ^|
echo ____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo o =^|--^|
echo o^| V' ^|
echo /^| ^|
echo / ^> ^|
echo ^|
echo ____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo o ^|
echo o^| =^|--^|
echo /^| V' ^|
echo ^>\ ^|
echo ^|
echo ^|
echo ____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo o ^|
echo o/ ^|
echo /^| =^|--^|
echo / ^> V' ^|
echo ^|
echo ^|
echo ^|
echo ____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo o ^|
echo o/ ^|
echo /^| =^|--^|
echo / \ V' ^|
echo ^|
echo ^|
echo ^|
echo ____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo o ^|
echo o/=^|--^|
echo /^| V' ^|
echo // ^|
echo ^|
echo ^|
echo ____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo φ' ^|
echo o ^|
echo -^|\ ^|
echo ^>^> ^|
echo ____________________________________________________________________^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo o ^|
echo o ^|
echo /^|\^|
echo __________________________________________________________________^>^>^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo ^|
echo o o ^|
echo /^|- ^|
echo ________________________________________________________________/_\_^|
ping -n 1 127.1>nul
cls
echo ^|
echo ^|
echo =^|--^|
echo V' ^|
echo 帅气吧? 呵呵~~~ ^|
echo o ^|
echo o /^|\ ^|
echo _______________________________________________________________/_\__^|
cls
for /l %%a in (1,1,8) do (
echo/
echo\
echo.
echo **********************************************************************
echo ***************************GAME OVER**********************************
echo **********************************************************************
color cf
ping -n 1 127.1>nul
color fc
ping -n 1 127.1>nul
cls
)
echo 按回车键继续
pause>nul
%0
(后面的"%0"是作为循环用的,如果把它去除,那么命令将会执行到pause按任意键盘结束程序而不是继续循环播放.)
= 。=大家有什么意见或者建议的提出来吖,程序可以更改成你自己喜欢的类型,只要你愿意.会CMD命令.:lol :sweat 画画功底差劲。篮框人都不清楚,包含个。
下面付上压缩包.直接下载解压运行就可以了.:funk (小心查毒)
[ 本帖最后由 dv-Partner 于 2007-7-5 16:45 编辑 ] |
-
-
篮球飞人.rar
730 Bytes, 下载次数: 9
CMD下运行篮球飞人.代码简单.
|