复制代码
- @echo off
- setlocal enabledelayedexpansion
- color 0a
- mode con: cols=80 lines=30
- title Code By GaryNg--Loading Bar Module
- set "clr=set bk="
- set "kuang=set /p=[ ]<nul"
- set "ping=ping -n 1 127.1 >nul 2>nul"
- set "done=set /p=]Done<nul&echo\"
- set "kuang1=set /p=[::::::::::::::::::::::::::::::::::::::::]<nul"
- ::1
- echo\&echo 1: An Easy Loading Bar&echo\&echo\&echo\&echo\
- %kuang%
- call :BK 40
- set /p=!bk!^|<nul
- for /l %%i in (1 1 39) do (
- set /p=^|<nul
- %ping%
- )
- %done%
- pause
- cls
- ::2
- echo\&echo 2: Sliding Loading Bar&echo\&echo\&echo\&echo\
- %kuang%
- call :BK 36
- set /p=!bk!^<==^><nul
- %ping%
- call :BK 3
- for /l %%i in (1 1 32) do (
- set /p=!bk! ^<==^><nul
- %ping%
- )
- %done%
- pause
- cls
- ::3
- echo\&echo 3: Go and Back Loading Bar&echo\&echo\&echo\&echo\
- %kuang%
- call :BK 36
- set /p=!bk!%cur%<nul
- %ping%
- call :BK 3
- for /l %%i in (1 1 36) do (
- set /p=!bk! ^<==^><nul
- %ping%
- )
- call :BK 5
- set /p=!bk!^<==^> <nul
- %ping%
- for /l %%i in (1 1 35) do (
- set /p=!bk!^<==^> <nul
- %ping%
- )
- set /p= ]Done<nul
- echo\
- pause
- cls
- ::4
- echo\&echo 4: Spining Loading&echo\&echo\&echo\&echo\
- %kuang%
- call :BK 40
- set /p=!bk!<nul
- %clr%
- set b=/-\ /-\ **
- :b
- for /l %%i in (0,1,390) do call :a %%i
- goto :c
- :a
- set/a a=%1%%10
- set/a c=%a%%%4
- if %a% EQU 0 set/p=.<nul
- if %c% EQU 3 (set/p=^|<nul) else (set/p=!b:~%a%,1!<nul)
- set/p=!bk!<nul
- goto :eof
- :c
- %done%
- pause
- cls
- ::5
- echo\&echo 5: Backward Loading Bar&echo\&echo\&echo\&echo\
- %clr%
- %kuang%
- set bk=!bk!
- for /l %%i in (1 1 40) do (
- set /p=!bk!^|<nul
- %ping%
- )
- echo\
- echo Done
- pause
- cls
- ::6
- echo\&echo 6. "Under Tunnel" Loading Bar&echo\&echo\&echo\&echo\
- call :SP 40
- set /p=[!sp!]<nul
- call :BK 36
- set /p=!bk!<nul
- %ping%
- call :BK 3
- for /l %%i in (1 1 36) do (
- set /p=!bk! ::::<nul
- %ping%
- )
- call :BK 39
- call :SP 36
- set /p=!bk!:!sp!<nul
- %ping%
- call :BK 35
- call :SP 36
- for /l %%i in (1 1 3) do (
- %ping%
- set /p=!bk!:!sp!<nul
- )
- call :BK 35
- set /p=!bk!<nul
- call :BK 3
- for /l %%i in (1 1 36) do (
- set /p=!bk! ::::<nul
- %ping%
- )
- %done%
- pause
- cls
- ::7
- echo\&echo 7. Go Towards Center Loading Bar&echo\&echo\&echo\&echo\
- %kuang%
- for /l %%i in (1 1 20) do (
- set c=
- set s=
- set /a c=42-2*%%i
- set /a s=!c!-2
- call :BK !c!
- call :SP !s!
- set /p=!bk!^|!sp!^|<nul
- %ping%
- )
- set /p=Done<nul
- echo\
- pause
- cls
- ::8
- echo\&echo 8. Replace To Load&echo\&echo\&echo\&echo\
- %kuang1%
- call :BK 40
- set /p=!bk!^|<nul
- for /l %%i in (1 1 39) do (
- set /p=^|<nul
- %ping%
- )
- %done%
- pause&exit
- :SP
- set sp=
- for /l %%i in (1 1 %1) do (
- set sp=!sp!
- )
- goto :eof
- :BK
- %clr%
- for /l %%i in (1 1 %1) do (
- set bk=!bk!
- )
- goto :eof
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |