做了个类似进度表的批处理;但要产生run.bat的临时文件,不知道有什么更好的办法,使程序更加简化些?- @echo off
- mode con: cols=44 lines=3&color 3f
- set ax=22
- set disl= ○◎● ●◎○
- :dis1
- echo set dod=%%disl:~%ax%,19%%>%temp%\run.bat
- call %temp%\run.bat
- cls&echo.&echo ∣%dod%∣
- ping -n 1 127.1 >nul
- ping -n 1 127.1 >nul
- ping -n 1 127.1 >nul
- if %ax%==0 set /a ax+=22&goto dis2
- set /a ax-=1&goto dis1
- :dis2
- echo set dod=%%disl:~%ax%,19%%>%temp%\run.bat
- call %temp%\run.bat
- cls&echo.&echo ∣%dod%∣
- ping -n 1 127.1 >nul
- ping -n 1 127.1 >nul
- ping -n 1 127.1 >nul
- if %ax%==44 set /a ax-=22&goto dis1
- set /a ax+=1&goto dis2
复制代码 |