本帖最后由 wc726842270 于 2011-10-6 10:50 编辑
- @echo off 2>nul 3>nul
- rem str中的变量用非英文编写,全角标,半角标没有试。试验的时候最好在单独的文件夹中,如果出错,不明白的尽量“X”掉
- setlocal enabledelayedexpansion
- set "col=123456789abcdef"
- set /a n2=-1,over=15
- set "str=枫中残雪:无心,无思,无情,无乡,无缘。没有失去,对我来说也没有珍惜。希望从何来,算了,还是不要明白好了。"
- :start
- set /a n=%random%%%14+1,n2+=1
- if %over% equ %n% goto :start
- if "!str:~%n2%,1!" neq "" (
- >"!str:~%n2%,1!" set /p "= "<nul
- findstr /a:0!col:~%n%,1! .* "!str:~%n2%,1!*"
- ping /n 2 127.1>nul
- del !str:~%n2%,1!
- set "over=%n%"
- )&&goto :start
复制代码
|