本文介绍了批量暂停问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打个钟,但是遇到麻烦了.

I'm trying to make a clock but I'm running into trouble.

:jual
set /p prompt=jual-
if %prompt% == varset goto varset
if %prompt% == varview goto varview
if %prompt% == clock goto clock
if %prompt% == games goto games
if %prompt% == exit exit
:clock
cls
echo %time%
echo Press any key to exit.
timeout 0 >nul
goto clock
pause >nul
goto jual

对于时钟,我希望它使用用户输入将其重定向回:jual,但是要重复执行,以便它实际上显示当前时间.我该如何解决?

For the clock, I want it to redirect with user input back to :jual but have it repeat so it actually displays the current time. How do I fix this?

推荐答案

类似的东西?

:loop
cls
choice /t 1 /c svcgxz /m "[varSet, varView, Clock, Games, eXit] %time% jual- " /d z
if errorlevel 6 goto :loop
if errorlevel 5 goto :eof
if errorlevel 4 goto games
if errorlevel 3 goto clock
if errorlevel 2 goto varview
if errorlevel 1 goto varset

这篇关于批量暂停问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 23:06