中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-09 23:51
47,811 topics / 349,897 posts / today 2 new / 48,255 members
DOS批处理 & 脚本技术(批处理室) » 【Visual Category】A square frame that gradually expands from the middle and then shrinks + changes color
Printable Version  5,041 / 17
Floor1 523066680 Posted 2008-05-25 13:08
银牌会员 Posts 1,133 Credits 2,362
This version's editing---if exist Q523066680

@echo off&mode con cols=60 lines=30 &color 0a
setlocal enabledelayedexpansion
set omax=oooooooooooooooooooooooooooooooooooooooo
set kmax=%omax:o= %
set n=4

:a
set /a n+=4
set /a upkh=15-%n%/4,kleft=30-%n%/2,zk=%n%-4,zkh=%n%/2-2
set leftk=!kmax:~0,%kleft%!
set zk=oo!kmax:~0,%zk%!oo
set hang=!omax:~0,%n%!
for /l %%a in (1,1,%upkh%) do echo.
echo.%leftk%%hang%
for /l %%a in (1,1,%zkh%) do echo.%leftk%%zk%
echo.%leftk%%hang%
echo.%n%
for /l %%a in (1,1,2) do ping -n>nul
cls
if %n%==40 set /a n=4
goto a

[ Last edited by 523066680 on 2008-7-8 at 10:01 PM ]
Floor2 523066680 Posted 2008-05-25 13:10
银牌会员 Posts 1,133 Credits 2,362
@echo off&mode con cols=64 lines=32 &color 0a
setlocal enabledelayedexpansion
set omax=oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
set kmax=%omax:o= %
set /a a=0,b=64

:a
if %a% leq 56 (set /a a+=4,n=%a%) else (set /a b-=4,n=%b%)
if %b% equ 0 (set /a a=4,b=60)

set /a upkh=16-%n%/4,kleft=32-%n%/2,zk=%n%-4,zkh=%n%/2-2
set leftk=!kmax:~0,%kleft%!
set zk=oo!kmax:~0,%zk%!oo
set hang=!omax:~0,%n%!
for /l %%a in (1,1,%upkh%) do echo.
echo.%leftk%%hang%
for /l %%a in (1,1,%zkh%) do echo.%leftk%%zk%
echo.%leftk%%hang%
echo.%n%
ping -n>nul
cls
goto a

[ Last edited by 523066680 on 2008-6-3 at 05:08 PM ]
Floor3 ThinKing Posted 2008-05-26 01:19
中级用户 Posts 207 Credits 471
Not bad, give an extra point to encourage ~~
Floor4 joytuyong1 Posted 2008-05-26 07:07
初级用户 Posts 39 Credits 101
Please provide the full context or more relevant information so that I can accurately translate and handle this content. Currently, the given content is incomplete for a comprehensive translation and analysis.
Floor5 clian76 Posted 2008-05-26 23:12
中级用户 Posts 162 Credits 363
Floor6 WANKOILZ Posted 2008-05-28 14:14
初级用户 Posts 89 Credits 198 From 重庆
Nice to see, good effect, especially the second floor.
Floor7 radem Posted 2008-05-28 23:03
高级用户 Posts 383 Credits 691
Why can't I see the effect
Floor8 HAT Posted 2008-05-28 23:15
版主 Posts 5,017 Credits 9,023
Originally posted by radem at 2008-5-28 11:03 PM:
Why can't I see the effect :(

What is your system version?
What is the name of the batch file you saved?
Is there any error message?

[ Last edited by HAT on 2008-5-29 at 12:39 PM ]
Floor9 vkill Posted 2008-05-29 18:17
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
Floor10 radem Posted 2008-05-29 18:25
高级用户 Posts 383 Credits 691
Originally posted by HAT at 2008-5-28 11:15 PM:

What is your system version?
What is the name of the batch file you saved?
Is there any error message?

[ Last edited by HAT on 2008-5-29 at 12:39 PM ]


1.WIN XPSP2
2.t.bat
3.no!

YYYYY???
Floor11 c442409110 Posted 2008-05-30 02:04
初级用户 Posts 9 Credits 20
Floor12 feixingzt Posted 2008-06-01 23:32
新手上路 Posts 5 Credits 10
Bump
Floor13 523066680 Posted 2008-06-03 17:16
银牌会员 Posts 1,133 Credits 2,362
The key part of the code on my 2nd floor is in the red part. I want the box to enlarge and then shrink, and I don't want to add too much to the code. Those two ifs are the results of my long thinking!

Personally, if I want to make a circular enlargement, I should first try to make a batch script that displays a quadratic function graph. I will work hard, but I'll only have internet access after the summer vacation. Everyone can also try more! The key points of the above batch script are --- determine the center coordinates (horizontal 32, vertical 16), calculate the number of empty lines above, calculate the number of left spaces, 00 the number of middle spaces 00 and the number of such lines.
Floor14 523066680 Posted 2008-06-22 12:34
银牌会员 Posts 1,133 Credits 2,362
::This version of the edit---if exist Q523066680
@echo off&mode con cols=68 lines=34
setlocal enabledelayedexpansion
set omax=oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
set kmax=%omax:o= %
set /a a=0,b=60
set /a num1=0,num=0
for %%C in (1 2 3 4 5 6) do (
set /a num1+=1
set color!num1!=%%C
)


:a
if %num% leq 5 (set /a num+=1) else set num=0
color !color%num%!

if %a% leq 56 (set /a a+=4,n=%a%) else (set /a b-=4,n=%b%)
if %b% equ 0 (set /a a=4,b=60)

set /a upkh=17-%n%/4,kleft=32-%n%/2,zk=%n%-4,zkh=%n%/2-2
set leftk=!kmax:~0,%kleft%!
set zk=oo!kmax:~0,%zk%!oo
set hang=!omax:~0,%n%!
for /l %%a in (1,1,%upkh%) do echo.
echo.%leftk%%hang%
for /l %%a in (1,1,%zkh%) do echo.%leftk%%zk%
echo.%leftk%%hang%
echo.%n%
for /l %%g in (1,1,8000) do rem
cls
goto a

[ Last edited by 523066680 on 2008-7-14 at 07:45 AM ]
Floor15 driver1998 Posted 2008-06-25 13:31
高级用户 Posts 373 Credits 740 From 中国,广东
Doing these things with P causes extremely high CPU usage. The one upstairs, once started, the CPU usage reaches 60%!
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023