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-08-13 00:14
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Still about how to get keyboard input, please help View 785 Replies 9
Original Poster Posted 2003-08-08 00:00 ·  中国 台湾 中华电信(HiNet)数据中心
中级用户
Credits 283
Posts 39
Joined 2003-07-12 00:00
23-year member
UID 6808
Gender Male
Status Offline
I want to have a batch file prompt me to enter a string of characters, then prompt me to enter it again and do a check. If it doesn't match, then report an error.
It's a bit like entering a new password, then entering it again; if it doesn't match, report an error, and if it does, confirm it.
Is there any software that can be directly used for this, like batchman or something?


我不是菜,是汤!!!
Floor 2 Posted 2003-08-08 00:00 ·  中国 福建 福州 电信
元老会员
★★★
农民
Credits 2,903
Posts 991
Joined 2003-07-23 00:00
23-year member
UID 7391
Gender Male
From 福建省
Status Offline
I think for this it's better to have the batch file call an executable that verifies passwords...
艰难奋长戟,万古用一夫

中国DOS联盟 http://www.cn-dos.net 欢迎大家来共同学习
我的MSN&E-Mail cn_archer@hotmail.com QQ 56049418
Floor 3 Posted 2003-08-08 00:00 ·  中国 广东 肇庆 电信
高级用户
★★
Credits 578
Posts 135
Joined 2003-07-10 00:00
23-year member
UID 6709
Gender Male
Status Offline
The following is quoted from lifeng5115's post at 2003-8-8 15:48:03:
I want to have a batch file prompt me to enter a string of characters, then prompt me to enter it again and do a check. If it doesn't match, then report an error.
It's a bit like entering a new password, then entering it again; if it doesn't match, report an error, and if it does, confirm it.
Is there any software that can be directly used for this, like batchman or something?
(Use get. I wrote a few lines for you; modify them as needed!)

:input
get s "Please input String:"
set a=%get%
get s "Input String Again:"
set b=%get%
if %a%==%b% goto ok
echo Error !
goto input
k
echo OK !


Floor 4 Posted 2003-08-09 00:00 ·  中国 广东 肇庆 电信
高级用户
★★
Credits 578
Posts 135
Joined 2003-07-10 00:00
23-year member
UID 6709
Gender Male
Status Offline
del...
Floor 5 Posted 2003-08-11 00:00 ·  中国 台湾 中华电信
中级用户
Credits 283
Posts 39
Joined 2003-07-12 00:00
23-year member
UID 6808
Gender Male
Status Offline
Thanks.
Is this get a command that comes with DOS, or a DOS software tool?
If it's DOS software, then where can I download it?
我不是菜,是汤!!!
Floor 6 Posted 2003-08-11 00:00 ·  中国 广东 肇庆 电信
高级用户
★★
Credits 578
Posts 135
Joined 2003-07-10 00:00
23-year member
UID 6709
Gender Male
Status Offline
Here you go: Open attachment
Floor 7 Posted 2003-08-11 00:00 ·  中国 河南 南阳 联通
初级用户
Credits 219
Posts 23
Joined 2003-08-11 00:00
23-year member
UID 8405
Gender Male
Status Offline
Thanks
Floor 8 Posted 2003-08-13 00:00 ·  中国 广东 肇庆 电信
高级用户
★★
Credits 578
Posts 135
Joined 2003-07-10 00:00
23-year member
UID 6709
Gender Male
Status Offline
You're welcome!
Floor 9 Posted 2003-08-13 00:00 ·  中国 台湾 中华电信(HiNet)数据中心
中级用户
Credits 283
Posts 39
Joined 2003-07-12 00:00
23-year member
UID 6808
Gender Male
Status Offline
我不是菜,是汤!!!
Floor 10 Posted 2003-08-13 00:00 ·  中国 台湾 中华电信
中级用户
Credits 283
Posts 39
Joined 2003-07-12 00:00
23-year member
UID 6808
Gender Male
Status Offline
Thanks, thanks hzy, many thanks
我不是菜,是汤!!!
Forum Jump: