Board logo

标题: [特效代码] 批处理电子表显示有问题, [打印本页]

作者: Roxx    时间: 2024-4-10 22:51     标题: 批处理电子表显示有问题,

本帖最后由 Roxx 于 2024-4-11 11:29 编辑

这个中间有冒号,但是显示有问题
  1. @echo off&SetLocal EnableDelayedExpansion&Mode Con Cols=54 Lines=6&Color 0a
  2. for %%a in (4 1 2 1 2 1 4 2 1 2 1 2 1 2 1 2 4 2 5 2 6 2 4 2 5 1 2
  3. 1 4 2 1 2 5 2 3 2 8 2 4 1 7 2 1 2 1 2 1 2 5 1 5 1 8 1 4 2 4) do (
  4.   set/a "cc=~cc"
  5.   for /l %%i in (1,1,%%a) do if "!cc!"=="0" (set "dgts=!dgts!  ") else set "dgts=!dgts!■"
  6. )
  7. for /l %%z in () do (
  8. if "!time:~7,1!" neq "!sec!" (
  9. set "sec=!time:~7,1!"
  10. set "oc="
  11. for /l %%h in (0,1,4) do (
  12. for %%d in (0 sp 1 sp : sp 3 sp 4 sp : sp 6 sp 7) do (
  13. if "%%d"==":" (
  14. set/a tt=%%h*5
  15. if "!tt:~-1!"=="0" (set "oc=!oc!  ") else set "oc=!oc!●"
  16. ) else (
  17. if "%%d"=="sp" (set "oc=!oc!  ") else (
  18. set "timeP=!time: =0!"
  19. set/a s=!timeP:~%%d,1!*15+%%h*3
  20. for %%o in (!s!) do set "oc=!oc!!dgts:~%%o,3!"
  21. )
  22. )
  23. )
  24. )
  25. cls
  26. set/p=!oc!<nul
  27. )
  28. )
复制代码
这个显示没问题 但是中间没有冒号
  1. @echo off & setlocal enabledelayedexpansion&mode con cols=54 lines=6 & color 0a
  2. SET n=10&set "#4=■■■"&set "#3=■  ■"&set "#2=■    "&set "#1=    ■"
  3. for %%a in (4 1 4 4 3 4 4 4 4 4 3 1 1 1 3 2 2 1 3 3 3 1 4 4 4 4 4 1 4 4 3 1 2 1 1 1 3 1 3 1 4 1 4 4 1 4 4 1 4 4) do set _!n!=#%%a&set/a n+=1
  4. for /l %%z in (1,0,1) do (
  5.   set v=!time:~7,1!&if not !v!==!t! (
  6.     cls&for /l %%a in (1,1,5) do (for /l %%b in (0,1,7) do (
  7.    set v=_%%a!time:~%%b,1!
  8.        for %%c in (!v!) do for %%d in (!%%c!) do set x=!x!!%%d!  )
  9.      echo,!x!&set x=&set t=!time:~7,1!)))
复制代码

作者: Roxx    时间: 2024-4-11 11:28

来人 来人 来大佬啊
作者: Five66    时间: 2024-4-11 17:18

  1. @rem @echo off & setlocal enabledelayedexpansion&mode con cols=54 lines=6 & color 0a
  2. @echo off & setlocal enabledelayedexpansion&mode con cols=60 lines=6 & color 0a
  3. SET n=10&set "#4=■■■"&set "#3=■  ■"&set "#2=■    "&set "#1=    ■"
  4. for %%a in (4 1 4 4 3 4 4 4 4 4 3 1 1 1 3 2 2 1 3 3 3 1 4 4 4 4 4 1 4 4 3 1 2 1 1 1 3 1 3 1 4 1 4 4 1 4 4 1 4 4) do set _!n!=#%%a&set/a n+=1
  5. set "#5=■"
  6. set "#6=  "
  7. set _1@=#6
  8. set _2@=#5
  9. set _3@=#6
  10. set _4@=#5
  11. set _5@=#6
  12. for /l %%z in (1,0,1) do (
  13.   set v=!time:~7,1!&if not !v!==!t! (
  14. set time2=!time::=@!
  15.     cls&for /l %%a in (1,1,5) do (for /l %%b in (0,1,7) do (
  16. rem    set v=_%%a!time:~%%b,1!
  17.    set v=_%%a!time2:~%%b,1!
  18.        for %%c in (!v!) do for %%d in (!%%c!) do set x=!x!!%%d!  )
  19.      echo,!x!&set x=&set t=!time:~7,1!))
  20. )
复制代码

作者: Roxx    时间: 2024-4-11 21:04

本帖最后由 Roxx 于 2024-4-11 23:13 编辑

感谢




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