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-24 16:31
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Batch processing emotional progress bar View 23,595 Replies 207
Floor 181 Posted 2008-02-27 20:58 ·  中国 湖北 黄石 电信
初级用户
Credits 62
Posts 30
Joined 2007-12-01 17:51
18-year member
UID 104364
Gender Male
Status Offline
Not bad! It would be even better if the code is more concise. Hehe!
Floor 182 Posted 2008-02-28 15:10 ·  中国 辽宁 沈阳 联通
新手上路
Credits 2
Posts 1
Joined 2008-02-28 14:35
18-year member
UID 111635
Gender Male
Status Offline
It's quite fun. Come and have a look.
Floor 183 Posted 2008-02-28 22:44 ·  中国 江西 赣州 电信
新手上路
Credits 8
Posts 4
Joined 2008-02-15 13:06
18-year member
UID 110700
Gender Male
Status Offline
Bump
Floor 184 Posted 2008-03-19 01:29 ·  中国 广东 电信
初级用户
★★
Credits 131
Posts 119
Joined 2007-06-12 22:50
19-year member
UID 91125
Gender Male
From gz
Status Offline
Originally posted by mouzeming at 2006-12-3 10:04 PM:
What does "ping -n 2 127.1>nul" mean?
I just joined not long ago. I don't understand this.
Please explain. I couldn't find relevant information online <maybe I didn't find it>



Ping yourself for 2 seconds >nul means not echoing the content

ping -n 2 127.1
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64

ping -n 2 127.1>nul
The time-consuming content is not echoed

ok...
Floor 185 Posted 2008-03-19 19:26 ·  中国 北京 电信
初级用户
Credits 28
Posts 12
Joined 2007-05-08 17:43
19-year member
UID 87879
Gender Male
Status Offline
ping -n 2 127.1>nul
Can be solved with sleep from 2003 Resource Kits Tools
C:\Documents and Settings\Administrator\Desktop\Resource Kits Tools>sleep /?
Usage: sleep time-to-sleep-in-seconds
sleep [-m] time-to-sleep-in-milliseconds
sleep [-c] commited-memory ratio (1%-100%)
Floor 186 Posted 2008-03-19 19:28 ·  中国 北京 电信
初级用户
Credits 28
Posts 12
Joined 2007-05-08 17:43
19-year member
UID 87879
Gender Male
Status Offline
Originally posted by sea1112 at 2008-3-19 01:29 AM:

Ping yourself with a time of 2 seconds >nul means no content is echoed

Ping -n 2 127.1
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64
Reply from 127.0.0.1: bytes=32 time<1ms TTL=64

Ping -n 2 1 ...


Ping your own computer (127.0.0.1) twice, output the result to nul, which serves the purpose of delaying.
C:\>ping /?

Usage: ping
| ]
target_name

Options:
-n count Number of echo requests to send.
Floor 187 Posted 2008-04-14 08:12 ·  中国 江西 宜春 电信
新手上路
Credits 2
Posts 1
Joined 2008-04-14 05:33
18-year member
UID 115817
Gender Male
Status Offline
Floor 188 Posted 2008-05-06 04:02 ·  中国 广西 南宁 电信
中级用户
★★
丶杏灬丶
Credits 280
Posts 105
Joined 2008-05-06 03:37
18-year member
UID 117858
Gender Male
From 广西
Status Offline
Floor 189 Posted 2008-05-06 04:17 ·  中国 广西 南宁 电信
中级用户
★★
丶杏灬丶
Credits 280
Posts 105
Joined 2008-05-06 03:37
18-year member
UID 117858
Gender Male
From 广西
Status Offline
But it's too redundant. It's better to simplify it.
Floor 190 Posted 2008-05-06 19:44 ·  中国 广西 南宁 电信
中级用户
★★
丶杏灬丶
Credits 280
Posts 105
Joined 2008-05-06 03:37
18-year member
UID 117858
Gender Male
From 广西
Status Offline
@echo off
mode con lines=10
title Emotional Progress Bar
color 0c
set /a sleep=1
set n=0
for /l %%i in (1,1,36) do (set /a n+=1&call :ech)
color fc
echo. Press any key to exit.......
pause > nul
exit
:ech
cls
set /a k=%n%*100
set /a i=%k%/36
if "%n%" EQU "36" (set end=Love Overflow...)
set bar=%bar%▉
echo ┏━━┓I ●╭○╮ I┏━━┓
echo ┃Eternity┃LOVE ★ /█∨█\ ★ Miss┃Forever┃
echo ┃Endurance┃You ∏ ∏ You┃Own┃
echo ┗━━┛. I love you for ten thousand years ┗━━┛
echo Emotional Progress Bar......%i%% %end%
echo ┏────────────────────────────────────┓
echo │%bar%
echo ┗────────────────────────────────────┛
ping -n %sleep% 127.1 > nul
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
bat-zw +3 2008-05-23 00:47
Floor 191 Posted 2008-05-22 23:17 ·  中国 广东 深圳 电信
新手上路
Credits 6
Posts 3
Joined 2008-05-21 14:38
18-year member
UID 119294
Gender Male
Status Offline
Yeah, I'll download it and try it out.
Floor 192 Posted 2008-05-23 00:59 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
Newcomer here to participate in learning. Thanks for sharing!
Floor 193 Posted 2008-05-23 09:30 ·  中国 广东 深圳 电信
新手上路
Credits 6
Posts 3
Joined 2008-05-21 14:38
18-year member
UID 119294
Gender Male
Status Offline
If this can be combined with FTP upload, it would be even better!
Floor 194 Posted 2008-05-23 13:17 ·  美国 戴尔电脑公司
新手上路
Credits 4
Posts 2
Joined 2005-11-06 15:21
20-year member
UID 44693
Gender Male
Status Offline
Now some programs still use batch processing, and adding such a scroll bar makes it much more beautiful.
Floor 195 Posted 2008-05-23 23:05 ·  中国 广东 深圳 宝安区 电信
初级用户
★★
Credits 188
Posts 96
Joined 2008-03-11 00:59
18-year member
UID 112592
Gender Male
Status Offline
Originally posted by joyn at 2008-5-6 07:44 PM:
@echo off
mode con lines=10
title 感情进度条
color 0c
set /a sleep=1
set n=0
for /l %%i in (1,1,36) do (set /a n+=1&call :ech)
color fc
echo.任意健退出.......
pause > nul
...

Not bad, support
Forum Jump: