现在我知道如何创建我称为的标签
例如 :startgame
我知道goto :startgame
或者在某些情况下goto startgame
只会带你回去
当我这样做的if %selector% == r goto :Start_1
时候,只是简单地将关闭批处理文件,而我尝试了使用caps的情况,不管有没有,都没有:
。
现在不要只是不礼貌地打电话给我无知,我知道基本的批处理
这是我的起始代码
:Start_1
echo **************************************************
echo ************App selector by michaelukz************
echo **************************************************
echo **************************************************
echo To select an app press any button.
pause
这是我正在尝试的代码
:Selected
echo You have selected your file.
echo If you wish to choose another file press R.
echo If you wish to close a program / file press C.
echo If you wish to close press any button.
SET /P"selected=Input letter here: "
if %selector% == r goto :Start_1
if %selector% == R goto :Start_1
if %selector% == c start taskmgr.exe
if %selector% == C start taskmgr.exe
if not timeout /T 3
echo Going to close menu
goto Closemenu
除...以外的所有其余作品goto start_1
。
请帮助,但不要无知-我已经看到其他人在这里如此狡猾。
看一下CHOICE
命令,您selector
在var名称中也拼错了SET /P
@echo off
:Start_1
echo **************************************************
echo ************App selector by michaelukz************
echo **************************************************
echo **************************************************
echo To select an app press any button.
:Selected
echo You have selected your file.
echo If you wish to choose another file press R.
echo If you wish to close a program / file press C.
echo If you wish to close press Q.
choice /C RCQ /N /M "Choose wisely [R,C,Q]" /D Q /T 30
goto action%errorlevel%
:action1
echo option R
goto start_1
goto selected
:action2
echo option C
start taskmgr.exe
goto selected
:action3
echo option Q
goto closemenu
goto Closemenu
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句