China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-22 02:23
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to represent a progress status with "\-/"? DigestI View 24,457 Replies 57
Floor 46 Posted 2007-04-17 05:12 ·  中国 广东 广州 番禺区 电信
新手上路
Credits 18
Posts 6
Joined 2007-04-14 17:02
19-year member
UID 85157
Gender Male
Status Offline
Wrote a...
Fainted....Only after sending did I realize it was an old post....Oh my...


@echo off
set str=-|/-|/
set f=1
set /a i=1
cls
setlocal enabledelayedexpansion
:test
ping /n 1 127.1>nul
if "%f%" == "1" (
set/p=!str:~%i%,1!<nul
set f=0
if "%i%" == "6" (set/a i=0) else (set/a i+=1)
goto :test
)
:: echo %f% &pause
set/p=<nul
set f=1
goto :test
pause>nul



[ Last edited by crenel on 2007-4-16 at 04:15 PM ]
Floor 47 Posted 2007-04-22 00:40 ·  中国 辽宁 大连 教育网
初级用户
Credits 45
Posts 25
Joined 2007-04-21 13:23
19-year member
UID 85991
Gender Male
Status Offline
Very interesting, I'll take it
Floor 48 Posted 2007-05-09 14:27 ·  中国 上海 浦东新区 电信
中级用户
★★
Credits 302
Posts 138
Joined 2007-03-29 02:33
19-year member
UID 83224
Gender Male
Status Offline
```
@echo off
rem qwe1234567 character animation

setlocal enabledelayedexpansion
set b=\^|/-\^|/-
set 速度=1

rem The ASCII code 08 is the backspace special control character
set 退格=


:b
for /l %%i in (0,1,200) do call :a %%i
goto :b
:a
set/a a=%1%%4
set/p=!b:~%a%,1!<nul
ping/n %速度% 127.1>nul
set/p=%退格%<nul
goto :eof
```
Beautify the effect of the redtek rotation animation :) Will digging up graves be -_-?
Floor 49 Posted 2007-05-12 17:22 ·  中国 广东 汕头 潮阳区 电信
高级用户
★★★
DOS时空
Credits 713
Posts 348
Joined 2007-02-10 13:59
19-year member
UID 79169
Gender Male
Status Offline
Awesome!!!!!
Floor 50 Posted 2007-05-12 18:04 ·  中国 广东 汕头 潮阳区 电信
高级用户
★★★
DOS时空
Credits 713
Posts 348
Joined 2007-02-10 13:59
19-year member
UID 79169
Gender Male
Status Offline
What you want is this effect, right.

@echo off
:: Simulate progress, with remaining time, completed progress, and progress bar display
:: code by bg 2007-05-12 CMD@XP
color 2f
title.
mode con lines=10
rem Progress bar ▉▉▉▉▉
set work=0
set n=0
set mo=0
set number=0
rem all is the total number
set all=60
set time=%all%
:show

:check
if %number% GTR %mo% set num=%num%▉&set /a mo=%mo%+1&goto check

:2
Floor 51 Posted 2007-05-28 01:04 ·  中国 广东 佛山 顺德区 电信
新手上路
Credits 7
Posts 3
Joined 2007-04-05 18:02
19-year member
UID 84069
Gender Male
Status Offline
There are so many experts in LS.
Floor 52 Posted 2007-05-28 18:30 ·  中国 江西 南昌 电信
初级用户
★★
Credits 193
Posts 98
Joined 2007-01-17 11:56
19-year member
UID 76803
Gender Male
Status Offline
Well, I can't really say much...
这家伙很聪明 什么都没留下
Floor 53 Posted 2008-10-08 05:04 ·  中国 山东 日照 五莲县 联通
初级用户
Credits 25
Posts 17
Joined 2008-10-06 20:32
17-year member
UID 127585
Gender Male
Status Offline
Power user
Floor 54 Posted 2009-05-01 23:34 ·  中国 江苏 盐城 联通
新手上路
Credits 3
Posts 2
Joined 2009-01-05 09:25
17-year member
UID 135812
Gender Male
Status Offline
Thanks for sharing, learning.
Floor 55 Posted 2009-09-12 13:00 ·  中国 浙江 绍兴 电信
新手上路
Credits 3
Posts 5
Joined 2009-07-07 08:52
16-year member
UID 148905
Gender Male
Status Offline
Wonderful!
Floor 56 Posted 2009-09-14 15:24 ·  中国 福建 泉州 电信
新手上路
Credits 6
Posts 3
Joined 2008-09-30 21:29
17-year member
UID 127114
Gender Male
Status Offline
@echo off
:kk
set /p=^\<nul
ping -n 1 127.0.0.1>nul
cls
set /p=^|<nul
ping -n 1 127.0.0.1>nul
cls
set /p=^/<nul
ping -n 1 127.0.0.1>nul
cls
goto kk
Floor 57 Posted 2009-09-17 21:33 ·  中国 广东 中山 联通
新手上路
Credits 1
Posts 1
Joined 2009-09-16 21:57
16-year member
UID 152127
Gender Male
Status Offline
Nice
Floor 58 Posted 2010-01-25 15:21 ·  中国 上海 东方有线
新手上路
Credits 1
Posts 1
Joined 2010-01-20 16:48
16-year member
UID 159081
Gender Male
Status Offline
Look~~~~~~~~~~~~~~~~~
Forum Jump: