中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --
联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟
中国DOS联盟论坛
现在时间是 2026-08-10 08:59
47,811 主题排行 / 349,897 发帖 / 今日 0 篇 / 48,255 会员排行
DOS批处理 & 脚本技术(批处理室) » 求纯DOS下运行的非数字输入无效的批处理
可打印版本  651 / 2
第1楼 hhwwll 发表于 2008-11-10 14:00
中级用户 发帖 30 积分 293
求纯DOS下运行的非数字输入无效的批处理
求纯DOS下运行的非数字输入无效的批处理
第2楼 tireless 发表于 2008-11-10 14:12
银牌会员 发帖 1,122 积分 2,025
http://www.westmesatech.com/editv.html

EditVar 1.8 - (C) 2006-2008 by Bill Stewart (bstewart@iname.com)

Allows interactive editing of environment variables.

Usage: EditVar var

-b Place cursor at the beginning of the input string.
-l len Allow no more than 'len' characters (1 to 255).
-m Masked input ('*' appears for each typed character).
-n Allow only numeric input (0-9).
-o Start in overtype mode.
-p prompt Prompt the user with 'prompt' (enclose in quotes if it has spaces).
-t n Assume Enter was pressed if nothing typed in 'n' seconds.
-u Force entered characters to uppercase.
var The environment variable's name (required).

Exit codes:
1 Error on the command line
2 Input line was blank
3 Environment variable was not changed
4 Program aborted with Ctrl-C
8 Insufficient space in environment to store variable
第3楼 hhwwll 发表于 2008-11-10 18:51
中级用户 发帖 30 积分 293
看不明白,有没有其他的方法?
[ 联系联盟系统管理团队 - 中国DOS联盟 - 标准版 ]
Sponsored by ifanr Inc | © 2001–2023