中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-10-25 04:09
47,815 topics / 349,928 posts / today 0 new / 48,288 members
DOS批处理 & 脚本技术(批处理室) » How to represent a progress status with "\-/"?
Printable Version  27,930 / 57
Floor16 kawakumo Posted 2006-10-31 01:52
初级用户 Posts 9 Credits 32
The effect made by redtek is exactly what I wanted to say, thanks.
Floor17 redtek Posted 2006-10-31 02:02
金牌会员 Posts 1,147 Credits 2,902
Don't thank me. A fun animation can't be realized without every participant:)

It was kawakumo who inspired a fun title and the idea of making an animation;
The code of youxi01 and the code of moderator qwe1234567 and a backspace application;
9527 discovered the problem of the backspace character when COPY CON,
And the super VBS skills of moderator 3742668,
With each of our participation and communication, the forum content will be more and more rich:)

[ Last edited by redtek on 2006-10-31 at 02:09 AM ]
Floor18 redtek Posted 2006-10-31 02:06
金牌会员 Posts 1,147 Credits 2,902
Originally posted by 9527 at 2006-10-31 01:58:
Still the same sentence---it's all my fault, I shouldn't have drawn conclusions so early...


If you don't COPY CON...
You won't even find that the backspace character was actually converted in real time when COPY con was used : )
Because everyone's participation will always play a role in promoting and discovering updated knowledge ~ : )
Floor19 kawakumo Posted 2006-10-31 02:10
初级用户 Posts 9 Credits 32
After several tests, this is a relatively nice effect

@echo off
setlocal enabledelayedexpansion
set b=/--\--
set 速度=0.8
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
Floor20 kawakumo Posted 2006-10-31 04:21
初级用户 Posts 9 Credits 32
I don't know how to implement the effects of youxi01 and redtek in the same line.

[ Last edited by kawakumo on 2006-10-31 at 04:22 AM ]
Floor21 redtek Posted 2006-10-31 05:28
金牌会员 Posts 1,147 Credits 2,902
Originally posted by kawakumo at 2006-10-31 04:21:
I don't know how to implement the effects of youxi01 and redtek in the same line?

[ Last edited by kawakumo on 2006-10-31 at 04:22 AM ]


Appropriate application of prohibiting backspace will make the displayed characters "move forward" ~ : )

The following is a very wonderful post! It can't be allowed to sink ~ : )
It talks about very detailed principles and enjoyable content ~ : )



   Brief Analysis of Helpless Signature Code
  http://www.cn-dos.net/forum/viewthread.php?tid=18838&fpage=1&highlight=%E6%97%A0%E5%A5%88%E4%BD%95
Floor22 youxi01 Posted 2006-10-31 05:50
高级用户 Posts 247 Credits 846 From 湖南==》广东
This may be the code you need:
@echo off
rem qwe1234567 character animation

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

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

:b
for /l %%i in (0,1,3) do call :a %%i
cls
goto :b
:a
set /a num=%1+1
set/p test=!b:~%1,1!!b:~0,%num%!<nul
ping/n %速度% 127.1>nul
set/p=%退格%<nul
goto :eof
Floor23 kawakumo Posted 2006-10-31 14:03
初级用户 Posts 9 Credits 32
No, what I want to say is as follows:
[Use * to represent the rolling \- /]
.*
..*
...*
....*
.....*
......*
.......*
Each time adding a dot is the effect of youxi01, and the rolling * is the effect of redtek, implemented in the same line.
Floor24 chenall Posted 2006-11-01 00:27
银牌会员 Posts 469 Credits 1,276 From 福建泉州
I also post one. I don't know if this meets the requirements of the person above.
Floor25 redtek Posted 2006-11-01 00:34
金牌会员 Posts 1,147 Credits 2,902
Haha... It's really fun to make~ : )
Floor26 newaifi Posted 2006-11-01 02:29
初级用户 Posts 67 Credits 154
Benefited a lot.
Although this method can create an "animation effect", the disadvantages are also obvious.
That is, the control of speed cannot be more accurately grasped.
Floor27 lxmxn Posted 2006-11-01 09:19
版主 Posts 4,938 Credits 11,386

To precisely control the speed, that is, to achieve delay, you can use third-party command-line tools.

Here is a recommended small tool called sleepx, which can be precise to ms, that is, precise to milliseconds.

Attachments
SleepX.rar (18.89 KiB)
Floor28 kawakumo Posted 2006-11-01 13:54
初级用户 Posts 9 Credits 32
That's good, it's exactly the effect made by chenall, really amazing.
Floor29 kawakumo Posted 2006-11-01 13:58
初级用户 Posts 9 Credits 32
If you want to use this effect to represent progress, how to control it? For example, display the progress of copying files.
Floor30 kawakumo Posted 2006-11-01 14:03
初级用户 Posts 9 Credits 32
Change "set b=/-\ /-\ " to "set b=./-\ /-\ ". Adding a dot makes the effect better when wrapping lines.
Prev  1 2 3 4  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023