|
kawakumo
初级用户
 
积分 32
发帖 9
注册 2006-10-30
状态 离线
|
『楼 主』:
如何用“\-/”表示一个进度状态?
使用 LLM 解释/回答一下
批处理中想用“\-/”表示一个进度状态,好像“-”在翻滚那样,要怎样实现?
In batch processing, you want to use "\-/" to represent a progress status, as if the "-" is rolling. How to achieve this?
|
|
2006-10-30 15:40 |
|
|
不得不爱
超级版主
         我爱DOS
积分 5310
发帖 2044
注册 2005-9-26 来自 四川南充
状态 离线
|
|
2006-10-30 20:43 |
|
|
youxi01
高级用户
   
积分 846
发帖 247
注册 2006-10-27 来自 湖南==》广东
状态 离线
|
|
2006-10-30 21:55 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
很象早期的压缩软件的处理过程,精彩~:)
给youxi01加分~:)
It's very similar to the processing of early compression software, wonderful~:) Add points to youxi01~:)
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-30 22:06 |
|
|
不得不爱
超级版主
         我爱DOS
积分 5310
发帖 2044
注册 2005-9-26 来自 四川南充
状态 离线
|
  『第 5 楼』:
使用 LLM 解释/回答一下
我也来个:
@echo off
setlocal enabledelayedexpansion
set b=\-/-
:b
for /l %%i in (0,1,32) do call :a %%i
cls
goto :b
:a
set/a a=%1%%4
set/p=!b:~%a%,1!<nul
ping/n 2 127.1>nul
goto :eof
第二个:
@echo off
setlocal enabledelayedexpansion
set b=\-/-
:b
for /l %%i in (0,1,3) do (
echo !b:~%%i,1!
ping /n 2 127.1>nul
cls)
goto b
Last edited by qwe1234567 on 2006-10-30 at 10:34 PM ]
I'll also do one:
@echo off
setlocal enabledelayedexpansion
set b=\-/-
:b
for /l %%i in (0,1,32) do call :a %%i
cls
goto :b
:a
set/a a=%1%%4
set/p=!b:~%a%,1!<nul
ping/n 2 127.1>nul
goto :eof
Second one:
@echo off
setlocal enabledelayedexpansion
set b=\-/-
:b
for /l %%i in (0,1,3) do (
echo !b:~%%i,1!
ping /n 2 127.1>nul
cls)
goto b
Last edited by qwe1234567 on 2006-10-30 at 10:34 PM ]
此帖被 +5 点积分 点击查看详情 评分人:【 redtek 】 | 分数: +4 | 时间:2006-10-31 02:38 | 评分人:【 sunxh 】 | 分数: +1 | 时间:2009-9-12 12:51 |
|
|

我的网络U盘 我的网络第2个U盘
论坛软件下载链接
灵雨飘零论坛
论坛新手必读,所有人的基本行为准则
刷QQ空间人气、留言的小软件 |
|
2006-10-30 22:26 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
 『第 6 楼』:
使用 LLM 解释/回答一下
Originally posted by 9527 at 2006-10-30 22:23:
我觉得楼主并不是这个意思,/\-这三个符号你们没有看出来组合出来是个星号吗?估计他要的效果是有转动的效果,如果是转动的效果P处理是无法实玠...
原来楼主想要好玩的动画啊~:)
转动的效果照样可以实现,俺认为没有做不到的事情:)
不仅仅是转动,就是做字处理插字、改都能~:)(要用到ASCII码特殊控置字符:)
在版主qwe1234567兄的代码的基础上加了一个退格功能:)
========== 注意: 请不要直接 COPY CON 文件名.bat 的方式COPY,
========== 因下面代码特殊控置字符,直接copy是拷贝不上的。
========== 简单办法:COPY到Windows的记事本,然后另存为批处理文件,再执行。
@echo off
setlocal enabledelayedexpansion
set b=\-/-
set 速度=2
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
“如果是转动的效果P处理是无法实现的”,实现了吧,嘻嘻……
Last edited by redtek on 2006-10-30 at 10:58 PM ]
Originally posted by 9527 at 2006-10-30 22:23:
I don't think the original poster meant that. Don't you see that the three symbols /\- combine to form an asterisk? It's estimated that the effect he wants is a rotating effect. If it's a rotating effect, Photoshop processing can't achieve it...
So the original poster wanted a fun animation~ : )
The rotating effect can still be achieved. I think there's nothing that can't be done : )
Not only rotation, but also word processing, inserting characters, modifying... : ) (Need to use ASCII code special control characters : )
Added a backspace function based on the code of moderator qwe1234567兄~ : )
====================== Note: Please don't directly use the method of COPY CON filename.bat to COPY,
====================== Because the following code has special control characters, direct copy won't copy properly.
====================== Simple method: COPY to Windows Notepad, then save as a batch file, then execute.
@echo off
setlocal enabledelayedexpansion
set b=\-/-
set 速度=2
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
"The rotating effect can't be achieved with P processing", it's achieved, hehehe...
Last edited by redtek on 2006-10-30 at 10:58 PM ]
此帖被 +7 点积分 点击查看详情 评分人:【 无奈何 】 | 分数: +4 | 时间:2006-10-31 00:17 | 评分人:【 xycoordinate 】 | 分数: +1 | 时间:2007-3-3 04:28 | 评分人:【 Eblis 】 | 分数: +2 | 时间:2007-3-3 06:02 |
|
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-30 22:39 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
你一定没试,它绝对是在(在原地)转动的效果!
楼主:“批处理中想用“\-/”表示一个进度状态,好像“-”在翻滚那样”,
绝是对这样的效果:)
每显示一个字符后,就后退一个格,然后再显示,
(很多命令行软件的提示都是这样的原理!)
这样,因为速度和人的视觉差原因,会产生一个动画的(类似转动起来的效果),
和早期压缩软件的处理效果动画一样。
Last edited by redtek on 2006-10-30 at 10:51 PM ]
You must not have tried it; it's definitely an effect of spinning (in place)!
LZ: "In batch processing, I want to use "\-/" to represent a progress status, it seems like the "-" is rolling", absolutely this kind of effect:)
After each character is displayed, it moves back one space, and then displays again,
(many command-line software prompts are based on this principle!)
In this way, due to the speed and the visual difference of people, an animation effect (similar to spinning) will be produced,
the same as the processing effect animation of early compression software.
Last edited by redtek on 2006-10-30 at 10:51 PM ]
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-30 22:48 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
等等,我代码COPY错了,我这里好几个,弄混了,
不过原地转动效果真的可以,等一下。
Wait, I copied the code wrong, there are several here, I got confused, but the spin effect really works, wait a minute.
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-30 22:54 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
等等,……我又看了,不是我COPY错了!
你一定是直接在CMD SHELL上使用COPY CON 文件名.bat
来COPY上面代码的,!
所以,那里面的“退格”=我后面放的是退格的特殊控置字符,
所以,你COPY的时候可就是真的产生退格键了,而这里的退格符号你是COPY不上去的。
(你直接COPY到记事本里,然后再存就没事了!)
(原来是copy con 文件名.bat 直接COPY上面内容时,系统怎么翻译那个退格符为真的退了两个格,致使变量赋值的语句不完整了)
向9527道歉,原来就是这个原因,哈哈……
Last edited by redtek on 2006-10-30 at 11:08 PM ]
Wait,...... I looked again, it's not that I copied wrong!
You must have directly used COPY CON filename.bat in the CMD SHELL to copy the above code,!
So, the "backspace" there = what I put later is the special control character for backspace,
So, when you copy, it actually generates the backspace key, and the backspace symbol here you can't copy.
(You directly copy to Notepad and then save it, it's fine!)
(Originally, when copying the above content directly with copy con filename.bat, the system translated that backspace character as really backspacing by two spaces, causing the variable assignment statement to be incomplete)
Apologize to 9527, it was originally this reason, haha......
Last edited by redtek on 2006-10-30 at 11:08 PM ]
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-30 22:56 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
直接下载,原地转动的批处理动画代码。
Direct download, batch animation code for rotating in place.
附件
1: q.rar (2006-10-30 23:00, 295 bytes, 下载附件所需积分 1 点
,下载次数: 310)
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-30 23:00 |
|
|
youxi01
高级用户
   
积分 846
发帖 247
注册 2006-10-27 来自 湖南==》广东
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
兄弟愚劣,能否告知:
rem ASCII码的08就是退格特殊控制符
set 退格=
中的退格是怎么得到的?
Brother, I'm not very smart. Can you tell me:
rem The ASCII code 08 is the backspace special control character
set 退格=
How is the backspace obtained here?
|
|
2006-10-31 00:37 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
) 第一种方法:
使用 MS-DOS自带的(WINDOWS CMD SHELL也有) ECIT.COM 编辑器得输入特殊控置符。
进入 EDIT.COM ,按 CTRL+P组合键,然后可以输入特殊字符:
如:退格键(让光标左移)控制符的ASCII码为 08,
则可以 ALT+08 (按住ALT键不入,然后按右侧小键盘上的0和8键,都输完了再松开ALT键。
注:CTRL+P只一次有效,如果再输入第二个控置字符,还得再按一次CTRL+P
) 第二种方法:用Debug得到
-D
0AF5:0100 20 20 20 20 20 0D 0A 20-20 20 20 0D 0A BA 8C 8A . .. .....
0AF5:0110 73 03 E9 4E FF 2B C8 74-D0 F6 06 15 34 00 E4 0A s..N.+.t....4...
0AF5:0120 F6 06 15 99 20 75 0A 80-3E D2 99 00 75 BB 49 74 .... u..>...u.It
0AF5:0130 B8 BA 0D 8C EB 23 33 D2-87 D1 B8 01 42 CD 21 A3 .....
0AF5:0140 DF 99 89 16 E1 99 80 3E-C5 96 00 74 9C B4 40 CD .......>...t..@.
0AF5:0150 21 72 5F C6 06 E3 99 1A-C3 E8 FF 0F FE 06 D2 96 !r_.............
0AF5:0160 80 3E D1 96 00 74 48 8B-1E 13 99 83 FB 00 7E 33 .>...tH.......~3
0AF5:0170 8B 0E E1 99 8B 16 DF 99-8B C1 0B C2 74 21 B8 00 ............t!..
-E 100
0AF5:0100 20.08
-W
Writing 0000D bytes
-Q
) 象退格这种特殊控置字符,直接在命令行上输入 ALT+08的话,它当时就“执行”了,直接就相当于你按了退格,把左边的内容删掉了。
所以,在edit.com或其它方式间接输入比较方便。
) 如果是 07 (响铃),在命令行上输入 GTRL+G、ALT+07都可以。
) 其它控置字符详见ASCII码表
详见如下贴子有更详细的内容……
DOS学习入门 & 精彩文章 (教学室) » ASCII码表及含义
http://www.cn-dos.net/forum/viewthread.php?tid=1641&fpage=1&highlight=ascii%E7%A0%81
Last edited by redtek on 2006-10-31 at 01:30 AM ]
) First method:
Using the ECIT.COM editor built into MS-DOS (also available in WINDOWS CMD SHELL) to enter special control characters.
Enter EDIT.COM, press the CTRL+P combination key, and then you can enter special characters:
For example: The ASCII code of the backspace key (to move the cursor to the left) is 08,
Then you can press ALT+08 (hold down the ALT key, then press the 0 and 8 keys on the right small keyboard, release the ALT key after both are entered.
Note: CTRL+P is only effective once. If you enter the second control character, you have to press CTRL+P again
) Second method: Get it with Debug
-D
0AF5:0100 20 20 20 20 20 0D 0A 20-20 20 20 0D 0A BA 8C 8A . .. .....
0AF5:0110 73 03 E9 4E FF 2B C8 74-D0 F6 06 15 34 00 E4 0A s..N.+.t....4...
0AF5:0120 F6 06 15 99 20 75 0A 80-3E D2 99 00 75 BB 49 74 .... u..>...u.It
0AF5:0130 B8 BA 0D 8C EB 23 33 D2-87 D1 B8 01 42 CD 21 A3 .....
0AF5:0140 DF 99 89 16 E1 99 80 3E-C5 96 00 74 9C B4 40 CD .......>...t..@.
0AF5:0150 21 72 5F C6 06 E3 99 1A-C3 E8 FF 0F FE 06 D2 96 !r_.............
0AF5:0160 80 3E D1 96 00 74 48 8B-1E 13 99 83 FB 00 7E 33 .>...tH.......~3
0AF5:0170 8B 0E E1 99 8B 16 DF 99-8B C1 0B C2 74 21 B8 00 ............t!..
-E 100
0AF5:0100 20.08
-W
Writing 0000D bytes
-Q
) For special control characters like backspace, if you enter ALT+08 directly on the command line, it will "execute" immediately, which is equivalent to you pressing the backspace and deleting the content on the left.
So, it is more convenient to enter it indirectly in edit.com or other ways.
) For 07 (ringing bell), you can enter GTRL+G or ALT+07 on the command line.
) For other control characters, refer to the ASCII code table
Refer to the following post for more detailed content...
DOS Learning Introduction & Wonderful Articles (Teaching Room) » ASCII Code Table and Meaning
http://www.cn-dos.net/forum/viewthread.php?tid=1641&fpage=1&highlight=ascii%E7%A0%81
Last edited by redtek on 2006-10-31 at 01:30 AM ]
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-31 01:15 |
|
|
youxi01
高级用户
   
积分 846
发帖 247
注册 2006-10-27 来自 湖南==》广东
状态 离线
|
|
2006-10-31 01:24 |
|
|
3742668
荣誉版主
      
积分 2013
发帖 718
注册 2006-2-18
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
3,用VBS:
createobject("scripting.filesystemobject").opentextfile("tmp.txt",2,true).write chr(8)
关于本主题的问题,其实在本版很早转载的一篇贴子(<深入挖掘Windows脚本技术>)里有提到过,现在看来领悟的朋友似乎比较少。
3, Use VBS:
createobject("scripting.filesystemobject").opentextfile("tmp.txt",2,true).write chr(8)
Regarding the problem of this topic, actually, it was mentioned in an early reprinted post in this section ("In-depth Exploration of Windows Script Technology"). Now it seems that relatively few friends have understood it.
|
|
2006-10-31 01:33 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
ASCII code tables and related content are detailed in the following posts ~:)
ASCII Code Table and Its Meaning
http://www.cn-dos.net/forum/viewthread.php?tid=1641&fpage=1&highlight=ascii%E7%A0%81
ASCII Encoding Table
http://www.cn-dos.net/forum/viewthread.php?tid=18942&fpage=1&highlight=ASCII
Viewing ASCII Code Star Wars in DOS Interface
http://www.cn-dos.net/forum/viewthread.php?tid=23874&fpage=1&highlight=ASCII
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
Posts related to ASCII code and more advanced posts about ANSI animations, drawings, and defining keyboards are as follows:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Use of ANSI.SYS Program
http://www.cn-dos.net/forum/viewthread.php?tid=1272&fpage=1&highlight=ANSI
Achieve Color Screen Display Effects Without ANSI Driver in CONFIG
http://www.cn-dos.net/forum/viewthread.php?tid=22025&fpage=1&highlight=ANSI
RAR Supports ANSI Escape Characters
http://www.cn-dos.net/forum/viewthread.php?tid=21800&fpage=1&highlight=ANSI
(As above: RAR supports ANSI escape characters)
( Can make personalized copyrights of your own website's RAR compressed packages and content declarations, etc.)
( Can indirectly use this built-in feature of RAR to simply learn ANSI - in an environment without pure DOS)
( Can indirectly draw favorite images, etc.)
( For content about ANSI drawing, many tools can be retrieved on gOOGLE.com)
( At the same time, tools for converting BMP image files to ANSI character maps can also be retrieved...)
Last edited by redtek on 2006-10-31 at 05:29 AM ]
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-10-31 01:49 |
|
|