- @echo off & setlocal enabledelayedexpansion
-
- copy nul output.txt >nul
-
- :loop1
- set /p c=请输入一个字符:
- if "!c!" == "" goto end
- call :choice
- set c=
- goto loop1
-
- :choice
- echo case "!c!":>>output.txt
- set /p d=请输入代码:
- echo, !d!>>output.txt
- echo break;>>output.txt
- goto :eof
-
- :end
- start notepad output.txt
- goto :eof
复制代码
|