Board logo

标题: [游戏娱乐] 批处理星罗满布 [打印本页]

作者: batman    时间: 2008-7-17 18:03     标题: 批处理星罗满布

  1. @echo off&color 1f&setlocal enabledelayedexpansion
  2. title 星罗满布 by zw19750516
  3. set "code= abcdefghij "&set "s=┃"
  4. set "codes=☆⊙★◎◇◆□■△▲"
  5. :begin
  6. echo.>temp.txt
  7. set /a a=%random%%%10+1,b=%random%%%10+1,c=%random%%%10
  8. set "b=!code:~%b%,1!"&set "tu=!codes:~%c%,1!"
  9. if not defined _%a%%b% (set "_%a%%b%=%tu%") else (goto begin)
  10. echo ┏━━┳━━┳━━┳━━┳━━┳━━┳━━┳━━┳━━┳━━┓>>temp.txt
  11. for /l %%a in (1,1,10) do (
  12.     for /l %%i in (1,1,10) do (
  13.         set "str=!code:~%%i,1!"
  14.         if defined _%%a!str! (call :lp %%a) else (set /p=%s%    <nul>>temp.txt)
  15.     )
  16.     set /p=%s% %%a<nul>>temp.txt&echo.>>temp.txt
  17.     if %%a neq 10 (
  18.        echo ┣━━╋━━╋━━╋━━╋━━╋━━╋━━╋━━╋━━╋━━┫>>temp.txt
  19.        ) else (      
  20.        echo ┗━━┻━━┻━━┻━━┻━━┻━━┻━━┻━━┻━━┻━━┛>>temp.txt
  21. ))
  22. for /l %%i in (1,1,10) do set /p=   !code:~%%i,1!  <nul>>temp.txt
  23. echo    %a%%b%>>temp.txt&set /a n+=1
  24. cls&type temp.txt
  25. if %n% lss 100 (for /l %%i in (1,1,1000) do echo>nul&goto begin) else (del /q temp.txt&pause>nul&goto :eof)
  26. :lp
  27. set "var=!_%1%str%!"
  28. set /p=%s% %var% <nul>>temp.txt
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2