我希望我的字符串在批处理文件中闪烁。以下对我来说很好。我的工作的计算机在第11个小时后很快将我注销,因此我喜欢视觉上的警告,因此我的批处理文件可以做到这一点。下面是到目前为止的代码,但是我的字符串状态没有闪烁。
@Echo off
mode 22,15
Color B
cls
set /a Minutes=0
set /a Time=0
Set /a Hours=0
Set /a Reset=11
set Str=Good
For /F "Tokens=*" %%I in ('Time /T') Do Set mytime=%%I
:hi
cls
Echo.
Echo Started %mytime%
Echo Status: %Str%
Echo.
Echo Time so far:
Echo.
Echo %Hours% Hours
Echo.
Echo %Minutes% Minutes
Echo.
Echo %Time% Seconds
Echo.
Echo %Reset% Hours to Reset
ping localhost -n 2 >nul
set /a time=%time%+1
if %time%==60 (
goto min
)else goto :hi
:min
set /a Time=0
set /a Minutes=%Minutes%+1
if %Minutes%==60 (
goto hours
)else goto :hi
goto hi
:hours
set /a Minutes=0
Set /a Reset=%Reset%-1
set /a Hours=%Hours%+1
if %Hours%==11 (
color 47
set Str=ResetEmement
) else goto :hi
goto hi