ある時点でユーザーに yes/no の質問をする単純な .bat ファイルを作成しました。ここで、タイムアウトを追加したいと思います-10秒としましょう-それに。それを行う簡単な方法はありますか?
これまでの私のソース:
SET /P ANSWER=Do you want it (Y/N)?
IF /i {%ANSWER%}=={y} GOTO :yes
IF /i {%ANSWER%}=={yes} GOTO :yes
GOTO :no
:yes
@echo Yeah, it will be done.
GOTO :continue
:no
@echo Nope, it will not happen.
GOTO :continue
:continue
@echo And on we go