Board logo

标题: 原创:CHOICE.EXE 2K3版本经典例子 [打印本页]

作者: secowu     时间: 2006-3-7 18:00    标题: 原创:CHOICE.EXE 2K3版本经典例子
:start
cls
color 2F
echo. ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆
echo.
echo 请选择是否马上关机
echo. ----------------------
echo 8秒后自动选择为:马上
echo. ----------------------
echo 请输入(Y马上/N稍后)进行选择
echo.
echo. ☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆
choice /c:YN /d Y /t 8 /N

if errorlevel 255 goto start
if errorlevel 2 goto a
if errorlevel 1 goto b
if errorlevel 0 goto start

:b
color 2F
echo.
echo.
echo 你选择的是马上关机
shutdown -s -t 0
exit

:a
color f2
echo.
echo.
echo 你选择的是稍后关机
shutdown -a
exit

作者: taoty     时间: 2006-3-7 22:57
进来学习一下。

作者: gorwoo     时间: 2006-3-11 21:41    标题: 高手你好!
CHOICE 的具体参数能详细说一下吗?

作者: bagpipe     时间: 2006-3-13 10:55
CHOICE version 4.1, Copyright (C) 1994--2003 Jim Hall, jhall@freedos.org
Waits for the user to press a key, from a list of choices
Usage: CHOICE choices ] c,nn ]
/B - Sound an alert (beep) at prompt
/Cchoices - Specifies allowable keys. Default is: yn
/N - Do not display the choices at end of prompt
/S - Be case-sensitive
/Tc,nn - Automatically choose key c after nn seconds
text - The text to display as a prompt


E文不好的不管,E文看的懂的不会翻译的不要,会翻译不会捡破烂的不要........

作者: hong138     时间: 2010-9-22 07:57
向楼主学习