我写一个同时存在的条件:
我不知道if如何写
就比如时间- @echo off
- color 0a
- setlocal enabledelayedexpansion
- set time1=%time:~0,-3%
- echo %time1%
- for /f "tokens=1-3 delims=: " %%a in ("%time1%") do (
- set b1=%%b
- set c1=%%c
- )
- set /p line3=请在址秒内输完:
- set time2=%time:~0,-3%
- echo %time2%
- for /f "tokens=1-3 delims=: " %%a in ("%time2%") do (
- set b2=%%b
- set c2=%%c
- )
- if %b1% equ %b2% (if %c1%+10 geq %c2% (goto right))
- if %b1% neq %b2% (if %c1%+10 geq %c2%+60 (echo right)) else (echo 你输入有误!)
- pause
复制代码 如果在十秒内输完而且正确,就跳转到指定的一个地方!最后if这要杂样写呀! |