找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 19206|回复: 0

[游戏娱乐] 批处理星罗满布

[复制链接]
发表于 2008-7-17 18:03:30 | 显示全部楼层 |阅读模式
  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
复制代码

评分

参与人数 1PB +5 收起 理由
foxJL + 5 原创内容

查看全部评分

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-16 22:58 , Processed in 0.018755 second(s), 9 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表