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-21 11:30
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » A Brief Analysis of the Helpless Signature Code DigestII View 56,322 Replies 63
Floor 31 Posted 2006-11-20 04:03 ·  中国 山东 青岛 崂山区 联通
新手上路
Credits 4
Posts 2
Joined 2006-07-16 11:06
19-year member
UID 58657
Status Offline
It's really good~! It seems that coming to the DOS Union was the right choice!
Floor 32 Posted 2006-11-20 06:44 ·  中国 北京 朝阳区 联通
高级用户
★★
朦胧的世界
Credits 579
Posts 218
Joined 2006-10-24 04:29
19-year member
UID 67972
Status Offline


if "!line:~%%i,1!"=="" goto :EOF
set /p= !line:~%%i,1!<nul


What about the 20th floor!
How to input the ASCII code for ring?
Can line breaks be represented by ASCII codes?

[ Last edited by tao0610 on 2006-11-20 at 02:05 PM ]
Floor 33 Posted 2006-11-23 05:52
中级用户
★★
DOS之日
Credits 337
Posts 161
Joined 2006-11-04 05:27
19-year member
UID 69523
Gender Male
Status Offline
Good post, bump~~~~
for /f %%h in (`echo hxuan`) do for /f %%x in (`echo hxuan`) do if %%h==%%x nul
Floor 34 Posted 2006-11-25 03:08 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
Originally posted by tao0610 at 2006-11-19 17:44:


The 20th floor is this!
How to input the ASCII code for ringing?
Can line breaks be represented by ASCII codes?

[ Last edited by tao0610 on 2006-11-20 at 02:05 PM ]



ASCII code for ringing: alt+07 or CTRL+G and other methods can be used to input ~ : )


C:\TEMP>echo echo 响一声儿~:) ^G >a.bat

C:\TEMP>a

C:\TEMP>echo 响一声儿~:)
响一声儿~:)

    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 35 Posted 2006-11-25 12:38 ·  中国 江苏 苏州 电信
新手上路
Credits 18
Posts 10
Joined 2006-05-14 03:27
20-year member
UID 55495
Gender Male
Status Offline
I. All are experts;
II. All are quite modest ^○^
Floor 36 Posted 2006-11-28 06:52 ·  中国 湖南 长沙 电信
初级用户
Credits 20
Posts 10
Joined 2006-11-26 10:52
19-year member
UID 71786
Gender Male
Status Offline
All are strong people! `` I support
Floor 37 Posted 2007-01-19 05:45 ·  中国 北京 方正宽带
新手上路
Credits 14
Posts 7
Joined 2007-01-19 05:09
19-year member
UID 76975
Gender Male
Status Offline
Really a strong person, respect
Floor 38 Posted 2007-01-19 06:06 ·  中国 北京 方正宽带
新手上路
Credits 14
Posts 7
Joined 2007-01-19 05:09
19-year member
UID 76975
Gender Male
Status Offline
One word: strong ~
Floor 39 Posted 2007-01-21 09:21 ·  中国 江苏 常州 金坛区 电信
初级用户
Credits 73
Posts 29
Joined 2006-08-13 21:22
19-year member
UID 60447
Status Offline
AlasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasdasDas唉……这一点点的代码足以让我琢磨一辈子了!惭愧啊,痴活了三十几年,看了LZ的【LZ的解释】,还是一头雾水。
惭愧,脸红……

Wait, no, I made a mistake earlier. Let's do it correctly.

The correct translation for the given content:

Oh... This little bit of code is enough to make me ponder for a lifetime! Ashamed, I've lived more than thirty years, and after reading LZ's explanation, I'm still completely confused.
Ashamed, blushing...

But need to follow the requirements precisely. Let's do it step by step.

Original Chinese text:
唉……这一点点的代码足以让我琢磨一辈子了!惭愧啊,痴活了三十几年,看了LZ的解释,还是一头雾水。
惭愧,脸红……

Translation:
Oh... This little bit of code is enough to make me ponder for a lifetime! Ashamed, I've lived over thirty years, but after reading LZ's explanation, I'm still completely at a loss.
Ashamed, blushing...
Floor 40 Posted 2007-02-05 14:27 ·  中国 山东 济南 电信
初级用户
Credits 125
Posts 44
Joined 2007-01-24 15:31
19-year member
UID 77555
Gender Female
Status Offline
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,,|set/p=%,:~%i,1%<nul

The last output segment uses a pipe symbol, and it can still be reduced by 7.8 characters.

[ Last edited by qjbm on 2007-2-5 at 01:37 AM ]
Floor 41 Posted 2007-02-05 15:35 ·  中国 北京 中移铁通
荣誉版主
★★★
Credits 1,338
Posts 356
Joined 2005-07-15 12:09
20-year member
UID 40733
Gender Male
Status Offline
%ComSpec% /cset,=He Nai Wu ── 。He Nai Ke Wu Shi Yuan, Shi Nai Wu Zuo Ren Nai Wu&for,/l,%i,in,(22,-1,0)do,@call,,|set/p=%,:~%i,1%<nul

The last output segment uses a pipe symbol, and it can still be reduced by 7.8 characters.




RE qjbm
Brother's idea of using the pipe symbol for delay is very good, which has streamlined a lot of characters. This is a very good optimization and simplification. The only regret is that the interval time of the custom typing effect cannot be set.
Inspired by brother, I simplified a few more characters as follows:

%ComSpec% /cset,=He Nai Wu ── 。He Nai Ke Wu Shi Yuan, Shi Nai Wu Zuo Ren Nai Wu&for,/l,%i,in,(22,-1,0)do,@cd|set/p= %,:~%i,1%


[ Last edited by Wu Nai He on 2007-2-5 at 04:31 PM ]
  ☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul

Floor 42 Posted 2007-02-07 09:22 ·  中国 山东 济南 电信
初级用户
Credits 125
Posts 44
Joined 2007-01-24 15:31
19-year member
UID 77555
Gender Female
Status Offline
This

@cd|

is even more shrouded in mystery, haha.
Floor 43 Posted 2007-02-07 09:54 ·  新西兰 奥克兰大区 奥克兰 Microsoft
高级用户
★★
Credits 783
Posts 268
Joined 2006-12-26 17:18
19-year member
UID 74627
Gender Male
Status Offline
cd is probably the shortest one, so the owner chose it
菩提本无树,明镜亦非台,本来无一物,何处惹尘埃.
Floor 44 Posted 2007-02-08 04:01 ·  中国 北京 中移铁通
荣誉版主
★★★
Credits 1,338
Posts 356
Joined 2005-07-15 12:09
20-year member
UID 40733
Gender Male
Status Offline
The principle of set/p has been very clearly explained by Brother willsort.
cd| makes an empty output.
<nul makes an empty input.
Both submitted to set/p are the same, just that the pipe command is a bit slower, having an effect similar to delay.
  ☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul

Floor 45 Posted 2007-02-10 14:30 ·  中国 贵州 贵阳 电信
初级用户
Credits 97
Posts 45
Joined 2007-01-31 06:02
19-year member
UID 78190
Gender Male
Status Offline
I really don't want to disturb the experts' chat, but good posts still need to be topped...
Forum Jump: