[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
本帖最后由 aa77dd@163.com 于 2015-12-25 04:15 编辑

回复 3# CrLf

大冬天的, 木太阳, 更难看到彩虹啊



.................................................................................................................................................................
.................................................................................................................................................................................
..........................................................................................................................................................................................
....................................................................................................................................................................................................
.........................................................................................................................................................................................................
................................................................................................................................................................................................................
.....................................................................................................................................................................................................................
...........................................................................................................................................................................................................................
...............................................................................................................................................................................................................................
...................................................................................................................................................................................................................................
.......................................................................................................................................................................................................................................
...........................................................................................................................................................................................................................................
..............................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................
....................................................................................................................................................................................................................................................
.......................................................................................................................................................................................................................................................
.........................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................
.............................................................................................................................................................................................................................................................




无聊弄一 cmd 生成 Discuz 彩虹代码
  1. @echo off & title discuz_RAINBOW_CODE_gen_彩虹代码生成器.cmd
  2. setlocal enableDelayedExpansion
  3. set "pnt="
  4. set /a "sum=0"
  5. for %%a in (00 2A 54 7E A8 D2 FC) do (
  6.     if not "!pnt!"=="" (
  7.         set "P!pnt!=%%a"
  8.         set "N%%a=!pnt!"
  9.     )
  10.     set "pnt=%%a"
  11.     set /a "sum+=1"
  12. )
  13. set /a "sumColor = (sum - 1) * 5 + 1"
  14. set        "R=FC"
  15. set        "G=00"
  16. set        "B=00"
  17. set       "co=RGB"
  18. set  "ALLMODE=PN"
  19. set     "mode=P"
  20. set    "bound=PFCN00"
  21. set   "act_ci=1"
  22. set   "act_ci=2"
  23. set        "B=2A"
  24. set     "mode=N"
  25. REM 行,列间距比
  26. set "r_R2C=14 / 4"
  27. set "r_C2R=4 / 14"
  28. set /a "top_compensation = 0"
  29. set /a "thick = sumColor * %r_R2C%, rad = thick * 2 / 8, t = (rad_max = thick + rad) + 1, r_sq_max = t * t + top_compensation"
  30. set /a "margin = 2, wid = (rad_max + margin) * 2, hei = rad_max * 1 / 2, L_hei = hei * %r_C2R%, xc = wid / 2, yc = rad_max + margin"
  31. >discuz_RAINBOW_CODE_彩虹代码.txt cd.
  32. set /a "radius=rad_max"
  33. for /L %%i in (1 1 %sumColor%) do (
  34.     for %%j in (!act_ci!) do set "act_c=!co:~%%j,1!"
  35.     for %%c in (!act_c!)  do set "cv=!%%c!"
  36.     for %%m in (!mode!!cv!) do if /i not "!bound:%%m=!"=="%bound%" (
  37.         for %%n in (!mode!) do set "mode=!ALLMODE:%%n=!"
  38.         set /a "act_ci = (act_ci - 1) %% 3"
  39.         for %%j in (!act_ci!) do set "act_c=!co:~%%j,1!"
  40.         for %%c in (!act_c!) do set "cv=!%%c!"
  41.     )
  42.     for /f "tokens=1-2" %%a in ("!mode! !cv!") do set "!act_c!=!%%a%%b!"
  43.     set /a "@%%i = r_sq_min = radius * radius, radius -= 1"
  44.     if %%i equ 15 set /a "@15 += 0" & rem 紫区补偿
  45.     set "C_!@%%i!=!R!!G!!B!"
  46. )
  47. set r_sq
  48. set C_
  49. set @
  50. set "exp=0"
  51. for /L %%i in (%sumColor% -1 1) do (
  52.     set "exp=t=x-@%%i>>31,~t&@%%i|t&(!exp!)"
  53. )
  54. set exp
  55. for /L %%y in (0 1 !L_hei!) do (
  56.     set "wh="
  57.     for /L %%x in (0 1 !wid!) do (
  58.         set /a "dx = %%x - xc, dy = (%%y * %r_R2C%) - yc, sq_d = dx * dx + dy * dy"
  59.         set "c="
  60.         if !sq_d! lss !r_sq_min! (
  61.             set "c=white"
  62.         ) else if !sq_d! geq !r_sq_max! (
  63.             set "c=white"
  64.         )
  65.         if not "!c!"=="white" (
  66.             set /a "x=sq_d,cpnt=(%exp%)"
  67.             for %%p in (!cpnt!) do set "c=#!C_%%p!"
  68.             if not "!wh!"=="" (
  69.                 >>discuz_RAINBOW_CODE_彩虹代码.txt <nul set /p "=[color=white]!wh![/color]"
  70.             )
  71.             >>discuz_RAINBOW_CODE_彩虹代码.txt <nul set /p "=[color=!c!].[/color]"
  72.             REM >>discuz_RAINBOW_CODE_彩虹代码.txt <nul set /p "=!sq_d!/!c! "
  73.             set "wh="
  74.         ) else (
  75.             set "wh=!wh!."
  76.         )
  77.     )
  78.     REM if not "!wh!"=="" (
  79.         REM 最后的空白可省略
  80.         REM >>discuz_RAINBOW_CODE_彩虹代码.txt <nul set /p "=[color=white]!wh![/color]"
  81.     REM )
  82.     >>discuz_RAINBOW_CODE_彩虹代码.txt echo;
  83. )
  84. start "" discuz_RAINBOW_CODE_彩虹代码.txt
  85. pause
  86. exit
复制代码
2

评分人数

TOP

返回列表