|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
 『楼 主』:
[下载]适用于Windows XP 的CHOICE
使用 LLM 解释/回答一下
从Win2003中提取的CHOICE 版本号5.2.3790.0
CHOICE
描述:
该工具允许用户从选择列表选择一个项目并返回所选项目的索引。
参数列表:
/C choices 指定要创建的选项列表。默认列表是 "YN"。
/N 在提示符中隐藏选项列表。提示前面的消息得到显示,
选项依旧处于启用状态。
/CS 允许选择分大小写的选项。在默认情况下,这个工具
是不分大小写的。
/T timeout 做出默认选择之前,暂停的秒数。可接受的值是从 0
到 9999。如果指定了 0,就不会有暂停,默认选项
会得到选择。
/D choice 在 nnnn 秒之后指定默认选项。字符必须在用 /C 选
项指定的一组选择中; 同时,必须用 /T 指定 nnnn。
/M text 指定提示之前要显示的消息。如果没有指定,工具只
显示提示。
/? 显示帮助消息。
注意:
ERRORLEVEL 环境变量被设置为从选择集选择的键索引。列出的第一个选
择返回 1,第二个选择返回 2,等等。如果用户按的键不是有效的选择,
该工具会发出警告响声。如果该工具检测到错误状态,它会返回 255 的
ERRORLEVEL 值。如果用户按 Ctrl+Break 或 Ctrl+C 键,该工具会返回 0
的 ERRORLEVEL 值。在一个批程序中使用 ERRORLEVEL 参数时,将参数降
序排列。
示例:
CHOICE /?
CHOICE /C YNC /M "确认请按 Y,否请按 N,或者取消请按 C。"
CHOICE /T 10 /C ync /CS /D y
CHOICE /C ab /M "选项 1 请选择 a,选项 2 请选择 b。"
CHOICE /C ab /N /M "选项 1 请选择 a,选项 2 请选择 b。"
Version of CHOICE extracted from Win2003: 5.2.3790.0
CHOICE
Description:
This tool allows the user to select an item from a list of choices and returns the index of the selected item.
Parameter list:
/C choices Specifies the list of options to create. The default list is "YN".
/N Hides the option list in the prompt. The message preceding the prompt is displayed, and the options remain enabled.
/CS Allows case-sensitive options to be selected. By default, this tool is case-insensitive.
/T timeout The number of seconds to pause before making a default selection. Acceptable values are from 0 to 9999. If 0 is specified, there will be no pause, and the default option will be selected.
/D choice Specifies the default option after nnnn seconds. The character must be in the set of choices specified with /C; also, /T must be used to specify nnnn.
/M text Specifies the message to display before the prompt. If not specified, the tool only displays the prompt.
/? Displays help message.
Note:
The ERRORLEVEL environment variable is set to the key index selected from the choice set. The first choice listed returns 1, the second choice returns 2, and so on. If the key pressed by the user is not a valid choice, the tool beeps. If the tool detects an error condition, it returns an ERRORLEVEL value of 255. If the user presses Ctrl+Break or Ctrl+C, the tool returns an ERRORLEVEL value of 0. When using the ERRORLEVEL parameter in a batch program, order the parameters in descending order.
Examples:
CHOICE /?
CHOICE /C YNC /M "Press Y to confirm, N to reject, or C to cancel."
CHOICE /T 10 /C ync /CS /D y
CHOICE /C ab /M "Select a for option 1, b for option 2."
CHOICE /C ab /N /M "Select a for option 1, b for option 2."
此帖被 +10 点积分 点击查看详情 评分人:【 redtek 】 | 分数: +2 | 时间:2006-11-2 23:19 | 评分人:【 lxmxn 】 | 分数: +2 | 时间:2007-1-15 15:33 | 评分人:【 oilio 】 | 分数: +2 | 时间:2007-1-30 01:22 | 评分人:【 no9ronaldo 】 | 分数: +2 | 时间:2008-1-1 23:14 | 评分人:【 kirov 】 | 分数: +2 | 时间:2009-9-11 04:57 |
|
附件
1: CHOICE.rar (2006-7-4 23:09, 16.42 KiB, 下载附件所需积分 1 点
,下载次数: 581)
|
|
2006-7-4 23:09 |
|
|
Scott0902
中级用户
  
积分 466
发帖 237
注册 2005-10-12
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
谢谢楼主的精品!收下了
Thanks to the LZ's excellent work! I've received it.
|
|
2006-7-5 00:21 |
|
|
music0
新手上路

积分 8
发帖 3
注册 2006-9-8
状态 离线
|
|
2006-11-4 02:02 |
|
|
qujiuduqing
新手上路

积分 10
发帖 5
注册 2006-11-3
状态 离线
|
|
2006-11-22 01:16 |
|
|
hangyug
初级用户
 
积分 99
发帖 43
注册 2007-1-12
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
谢谢LZ,真是找了好久了啊!!!
Thank you, LZ. I've really been looking for this for a long time!!!
|
|
2007-1-14 02:26 |
|
|
weilong888
银牌会员
    
积分 1270
发帖 548
注册 2004-5-31
状态 离线
|
|
2007-1-14 03:33 |
|
|
yesmao
初级用户
 
积分 35
发帖 18
注册 2007-1-14
状态 离线
|
|
2007-1-14 04:27 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
我xp系统,正好能用,谢谢。
My XP system, it just works, thank you.
|
|
2007-1-15 15:34 |
|
|
gmy
版主
        操作系统爱好者
积分 1113
发帖 392
注册 2002-11-11
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
与XP版的有何改进?
What improvements are there compared to the XP version?
|

DOS之家 http://doshome.com 站长 葛明阳 |
|
2007-1-16 06:49 |
|
|
zhenfu
中级用户
  
积分 204
发帖 21
注册 2003-7-27
状态 离线
|
|
2007-1-17 13:44 |
|
|
fastslz
铂金会员
       DOS一根葱
积分 5493
发帖 2315
注册 2006-5-1 来自 上海
状态 离线
|
|
2007-1-18 04:22 |
|
|
oilio
高级用户
    前进者
积分 641
发帖 303
注册 2007-1-10
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
嗯,以前我照着写过小的批处理,但没有choice,这下好了,谢谢楼主!
Well, I used to write small batch scripts according to examples, but there was no choice before. Now it's fine, thank you, the thread starter!
|

我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿! |
|
2007-1-30 01:23 |
|
|
taoty
中级用户
   传说中的菜鸟
积分 275
发帖 112
注册 2005-4-22
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
汗,偶用得是精减版系统还以为这个命令被精减掉了。
Sweat, I thought this command was streamlined because I'm using a streamlined version system.
|
|
2007-2-7 11:15 |
|
|
wangxiangtcm
初级用户
 
积分 21
发帖 10
注册 2007-2-8
状态 离线
|
|
2007-2-9 09:02 |
|
|
kpshare
初级用户
 
积分 58
发帖 23
注册 2007-2-12
状态 离线
|
『第 15 楼』:
有问题呀
使用 LLM 解释/回答一下
虽然可以用,但是一输入choice命令之后,中文就无法再显示了,只显示为???,中文也无法输入,只是能输入中文,请问这样如何解快呀!!!
Although it can be used, but after entering the choice command, Chinese can no longer be displayed, only displayed as???, and Chinese cannot be input, only can input Chinese, how to solve this ah!!!
(注:原句中“解快”应为“解决”,但按照要求只进行翻译,不进行修改错误字词的修正说明,所以直接按原文翻译,只是将“解快”保留原文,因为翻译要求是不修改原文内容,只进行语言转换。不过其实严格来说这里“解快”是错别字,正确应该是“解决”,但按照指令要求,不能修改原文内容,所以保留原文进行翻译。)
|
|
2007-2-22 03:34 |
|