最近不知道要做什么批处理好,就做个滚动文字的批处理,发上来给大家看看,顺便问下大家感觉如何
再附上几个问题:
1. 除了用退格符,还有没有其他方法,可以达到同样的功能?(即去除一个空格)
2. 感觉文字有点闪,能做到更好么?
如果要运行,请下载这个sleep.com,放到批处理的目录下- @echo off
- title My eye hurt when I done a program!
- mode con cols=80 lines=18
- color 08
- call :msg
- call :fadein
- :loop
- set time=0
- call :space
- set time=0
- call :despace
- goto loop
-
- :despace
- set /a time+=1
- set space=%space%
- call :msg
- if "%time%"=="17" exit /b
- goto despace
-
- :space
- set /a time+=1
- set space=%space%
- call :msg
- if "%time%"=="17" exit /b
- goto space
-
- :msg
- cls
- echo.
- echo %space%For my dream
- echo.
- echo %space%For improving my program..
- echo.
- echo %space%I alway need to stuck with these..
- echo.
- echo %space%Hurting eye code.. I HATE IT! (╰_╯)#
- echo.
- echo.
- echo %space%But I think it is worth.. for me..
- echo.
- echo %space%As no pay, no get... right?
- echo.
- echo %space%How about... you? O(∩_∩)O
- sleep 200
- exit /b
-
- :fadein
- color 08
- sleep 200
- color 07
- sleep 200
- color 0f
- exit /b
复制代码
|