【发布时间】:2017-04-11 11:28:30
【问题描述】:
我试图制作一个改变颜色的程序,但它不起作用。 我按下任何按钮,它不会改变,然后就关闭了。我不知道为什么它不起作用
@echo off
set letter2=0
:1
set color=%random%
if %color% LSS 10 goto next
goto 1
:next
set letter=%random%
if %random% LSS 6 goto 2
:2
if %letter% == 0 goto A
if %letter% == 1 goto B
if %letter% == 2 goto C
if %letter% == 3 goto D
if %letter% == 4 goto E
if %letter% == 5 goto F
goto next
:a
set %letterr2% == a
goto final
:b
set %letterr2% == b
goto final
:c
set %letterr2% == c
goto final
:d
set %letterr2% == d
goto final
:e
set %letterr2% == e
goto final
:f
set %letterr2% == f
:final
set realcolor=%letter2%+%color%
cls
color %realcolor%
echo hey this color is %color%
pause>nul
goto 1
【问题讨论】:
标签: batch-file