首发于http://www.cn-dos.net/forum/viewthread.php?tid=45423&fpage=1
作者:523066680
blog: http://hi.baidu.com/523066680
仅作为一次娱乐,突发奇想,若浪费大家时间,莫怪莫怪
特别遗憾的就是代码颇长。
@echo off&setLocal enabLedeLayedexpansion
::made by 523066680 2008-12-25
title made by 523066680@cn-dos.net
mode con coLs=45 Lines=22
set num=0123456789abcdefghi
set L0=0 1 2 3 4 5 6 7 8 9 a b c d e f g h
for /l %%a in (1,1,18) do (set L=□!L!)
for /l %%a in (1,1,18) do (set L%%a=%L%)
for /l %%a in (0,1,18) do (set n!num:~%%a,1!=%%a)
for /l %%a in (0,1,18) do (echo, !L%%a! !num:~%%a,1!)
:a
set /p n="(yx): "
if "%n%"=="quit" (exit)
if "%n%"=="exit" (echo,@set evern=%evern%>x.x &exit)
set evern=%evern% %n%
if "%n:~-1%"=="#" (set "str=□") else (set "str=■")
if "%n:~3%"=="" (set "do=::") else (set "do=")
set /a ya=n%n:~0,1%,xa=n%n:~1,1%,xa2=xa+1
%do% set /a yb=n%n:~2,1%,xb=n%n:~3,1%,xb2=xb+1
%do% set "YorX=%n:~4,1%" &set "add=%n:~5,1%"
:a-1
set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
%do% set /a %YorX%a%add%=1,xa2=xa+1
%do% if not !%YorX%a! equ !%YorX%b! (goto :a-1)
%do% set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
:echo
ping -n 1 127.1>nul
cLs
for /l %%a in (0,1,18) do (echo, !L%%a! !num:~%%a,1!)
goto :a
0 1 2 3 4 5 6 7 8 9 a b c d e f g h 0
□□□□□□□□□□□□□□□□□□ 1
□□□□□□□□□□□□□□□□□□ 2
□□□□□□□□□□□□□□□□□□ 3
□□□□□□□□□□□□□□□□□□ 4
□□□□□□□□□□□□□□□□□□ 5
□□□□□□□□□□□□□□□□□□ 6
□□□□□□□□□□□□□□□□□□ 7
□□□□□□□□□□□□□□□□□□ 8
□□□□□□□□□□□□□□□□□□ 9
□□□□□□□□□□□□□□□□□□ a
□□□□□□□□□□□□□□□□□□ b
□□□□□□□□□□□□□□□□□□ c
□□□□□□□□□□□□□□□□□□ d
□□□□□□□□□□□□□□□□□□ e
□□□□□□□□□□□□□□□□□□ f
□□□□□□□□□□□□□□□□□□ g
□□□□□□□□□□□□□□□□□□ h
□□□□□□□□□□□□□□□□□□ i
用法:
直接输入坐标,如: 10 ,会在屏幕上描第一行第0编号的点,其实是第一行第一个点
假如后悔输入了这个点,再输入10# 就会把这个点去掉
对于斜线曲线,只能一个个点描了。
假如是一条竖线,或横线,可以输入两端点坐标 和"参数",
比如说,第一行第 1 到 f 的位置都要描点,从11到1f,就输入 111fx+
如果从1f到11,就输入1f11x- ;竖线,例如 10i0y+ 或i010y- 因为是直线,所以其中一个坐标是固定的
(都算是对使用者的要求吧...输入错误就会死循环的)
仍然可以一整条的取消,例如:111fx+#
(后面带#的代表取消)
当一个字编辑好以后,
输入exit结束 会把过程中输入的编码输出到 x.x 文件 编码记录着顺序,贴到已经编好的特效
脚本行首,就可了。其实 特效脚本 和 编辑器 的代码大部分一样,
编辑器只是为了方便看到结果并编辑,而特效脚本只是将作者原来输入的信息自动地"输入"一次罢了。
输入quit结束 直接结束,不生成x.x文件
因为有用# 符号撤销描点的部分,所以特效一般会照搬过程,例如输入信息中有 111dx+ 111dx+#
找到这部分, 去掉 111dx+ 111dx+#,过程就会跳过这个。
以下是一个特效模板:
第一行的编码是一个例子,出现了写错又擦掉的过程。可以试着去掉 1b1cx+ 1b1cx+# 再看一次。
看自己的编辑的效果:把自己编辑获得的编码 整句 代替以下代码的第一行即可。
@set evern= 1151y+ 1316x+ 1636y+ 3633x- 3353y+ 5356x+ 181bx+ 1b1cx+ 1b1cx+# 1b 1b5by+ 383ax+ 585ax+
@echo off&setLocal enabLedeLayedexpansion
mode con coLs=40 Lines=22
color 40
set "L0=" &set "num=0123456789abcdefghi"
for /l %%a in (1,1,18) do (set L=□!L!)
for /l %%a in (1,1,18) do (set L%%a=%L%)
for /l %%a in (0,1,18) do (set n!num:~%%a,1!=%%a)
for %%a in (%evern%) do (call :a %%a)
pause
exit
:a
set n=%~1
if "%n:~-1%"=="#" (set "str=□") else (set "str=■")
if "%n:~3%"=="" (set "do=::") else (set "do=")
set /a ya=n%n:~0,1%,xa=n%n:~1,1%,xa2=xa+1
%do% set /a yb=n%n:~2,1%,xb=n%n:~3,1%,xb2=xb+1
%do% set "YorX=%n:~4,1%" &set "add=%n:~5,1%"
:a-1
set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
call :echo
%do% set /a %YorX%a%add%=1,xa2=xa+1
%do% if not !%YorX%a! equ !%YorX%b! (goto :a-1)
%do% set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
%do% for /l %%a in (1,1,3) do (ping -n 1 127.1>nul)
:echo
for /l %%a in (1,1,3) do (ping -n 1 127.1>nul)
cLs
for /l %%a in (0,1,18) do (echo, !L%%a!)
goto :eof
其实修改后也可以用来编辑和获得字符组成的图案,下面是自己编辑的字符进行组合(编的不太好唷...):
■
■■ ■
■■■■■■■■ ■■■■■■■■■
■■■■ ■■■
■■■ ■■■■■■■■
■■■■■■■■■■■■■■ ■■
■■■ ■■
■■■■■■■ ■■
■■■ ■■■■■■■■■■■
■■■■■ ■
■■■■■ ■
■■■ ■
■■■ ■
■■■■ ■
■■ ■
■■ ■
■■■■■■■■ ■■
■■■■ ■■■■
■■■■■ ■■
■■■■■ ■■
■■■■■■■■■■■ ■■
■■ ■■■■■■■■■■■■■
■■ ■
■■ ■
■■■ ■■■
■■■ ■■■
■■■ ■■■
■■■■ ■
■ ■
■■
Last edited by 523066680 on 2008-12-28 at 14:15 ]
First published at http://www.cn-dos.net/forum/viewthread.php?tid=45423&fpage=1
Author: 523066680
blog: http://hi.baidu.com/523066680
Just for entertainment, a whim. If it wastes everyone's time, please don't mind.
The special regret is that the code is quite long.
@echo off&setLocal enabLedeLayedexpansion
::made by 523066680 2008-12-25
title made by 523066680@cn-dos.net
mode con coLs=45 Lines=22
set num=0123456789abcdefghi
set L0=0 1 2 3 4 5 6 7 8 9 a b c d e f g h
for /l %%a in (1,1,18) do (set L=□!L!)
for /l %%a in (1,1,18) do (set L%%a=%L%)
for /l %%a in (0,1,18) do (set n!num:~%%a,1!=%%a)
for /l %%a in (0,1,18) do (echo, !L%%a! !num:~%%a,1!)
:a
set /p n="(yx): "
if "%n%"=="quit" (exit)
if "%n%"=="exit" (echo,@set evern=%evern%>x.x &exit)
set evern=%evern% %n%
if "%n:~-1%"=="#" (set "str=□") else (set "str=■")
if "%n:~3%"=="" (set "do=::") else (set "do=")
set /a ya=n%n:~0,1%,xa=n%n:~1,1%,xa2=xa+1
%do% set /a yb=n%n:~2,1%,xb=n%n:~3,1%,xb2=xb+1
%do% set "YorX=%n:~4,1%" &set "add=%n:~5,1%"
:a-1
set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
%do% set /a %YorX%a%add%=1,xa2=xa+1
%do% if not !%YorX%a! equ !%YorX%b! (goto :a-1)
%do% set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
:echo
ping -n 1 127.1>nul
cLs
for /l %%a in (0,1,18) do (echo, !L%%a! !num:~%%a,1!)
goto :a
0 1 2 3 4 5 6 7 8 9 a b c d e f g h 0
□□□□□□□□□□□□□□□□□□ 1
□□□□□□□□□□□□□□□□□□ 2
□□□□□□□□□□□□□□□□□□ 3
□□□□□□□□□□□□□□□□□□ 4
□□□□□□□□□□□□□□□□□□ 5
□□□□□□□□□□□□□□□□□□ 6
□□□□□□□□□□□□□□□□□□ 7
□□□□□□□□□□□□□□□□□□ 8
□□□□□□□□□□□□□□□□□□ 9
□□□□□□□□□□□□□□□□□□ a
□□□□□□□□□□□□□□□□□□ b
□□□□□□□□□□□□□□□□□□ c
□□□□□□□□□□□□□□□□□□ d
□□□□□□□□□□□□□□□□□□ e
□□□□□□□□□□□□□□□□□□ f
□□□□□□□□□□□□□□□□□□ g
□□□□□□□□□□□□□□□□□□ h
□□□□□□□□□□□□□□□□□□ i
Usage:
Directly input coordinates, such as: 10, which will draw the point at the 0th number in the first line on the screen, actually the first point in the first line
If you regret entering this point, enter 10# again to remove this point
For slanted curves, you can only draw point by point.
If it is a vertical line or a horizontal line, you can input the coordinates of the two endpoints and "parameters"
For example, if you need to draw points from position 1 to f in the first line, from 11 to 1f, enter 111fx+
If from 1f to 11, enter 1f11x-; for a vertical line, for example, 10i0y+ or i010y- because it is a straight line, so one of the coordinates is fixed
(It's all requirements for the user... If you enter incorrectly, it will go into an infinite loop)
You can still cancel the entire line, for example: 111fx+#
(The one with # at the end means cancellation)
When a character is edited,
Enter exit to end, and the code entered during the process will be output to the x.x file. The code records the order. Paste it at the beginning of the already compiled special effect script line, and it's done. Actually, the special effect script and the code of the editor are mostly the same. The editor is just to facilitate seeing the result and editing, and the special effect script just automatically "inputs" the original input information once.
Enter quit to end, and no x.x file will be generated
Because there is a part to cancel the drawn point with the # symbol, the special effect will generally copy the process. For example, if there is 111dx+ 111dx+# in the input information, find this part, remove 111dx+ 111dx+#, and the process will skip this.
The following is a special effect template:
The code in the first line is an example, and there is a process of writing wrong and then erasing. You can try to remove 1b1cx+ 1b1cx+# and then see again.
To see your own editing effect: replace the entire line of the code you edited with the first line of the following code.
@set evern= 1151y+ 1316x+ 1636y+ 3633x- 3353y+ 5356x+ 181bx+ 1b1cx+ 1b1cx+# 1b 1b5by+ 383ax+ 585ax+
@echo off&setLocal enabLedeLayedexpansion
mode con coLs=40 Lines=22
color 40
set "L0=" &set "num=0123456789abcdefghi"
for /l %%a in (1,1,18) do (set L=□!L!)
for /l %%a in (1,1,18) do (set L%%a=%L%)
for /l %%a in (0,1,18) do (set n!num:~%%a,1!=%%a)
for %%a in (%evern%) do (call :a %%a)
pause
exit
:a
set n=%~1
if "%n:~-1%"=="#" (set "str=□") else (set "str=■")
if "%n:~3%"=="" (set "do=::") else (set "do=")
set /a ya=n%n:~0,1%,xa=n%n:~1,1%,xa2=xa+1
%do% set /a yb=n%n:~2,1%,xb=n%n:~3,1%,xb2=xb+1
%do% set "YorX=%n:~4,1%" &set "add=%n:~5,1%"
:a-1
set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
call :echo
%do% set /a %YorX%a%add%=1,xa2=xa+1
%do% if not !%YorX%a! equ !%YorX%b! (goto :a-1)
%do% set L%ya%=!L%ya%:~0,%xa%!%str%!L%ya%:~%xa2%!
%do% for /l %%a in (1,1,3) do (ping -n 1 127.1>nul)
:echo
for /l %%a in (1,1,3) do (ping -n 1 127.1>nul)
cLs
for /l %%a in (0,1,18) do (echo, !L%%a!)
goto :eof
In fact, after modification, it can also be used to edit and obtain character patterns. The following is the combination of characters edited by yourself (not very well compiled...):
■
■■ ■
■■■■■■■■ ■■■■■■■■■
■■■■ ■■■
■■■ ■■■■■■■■
■■■■■■■■■■■■■■ ■■
■■■ ■■
■■■■■■■ ■■
■■■ ■■■■■■■■■■■
■■■■■ ■
■■■■■ ■
■■■ ■
■■■ ■
■■■■ ■
■■ ■
■■ ■
■■■■■■■■ ■■
■■■■ ■■■■
■■■■■ ■■
■■■■■ ■■
■■■■■■■■■■■ ■■
■■ ■
■■ ■
■■■ ■■■
■■■ ■■■
■■■ ■■■
■■■■ ■
■ ■
■■
Last edited by 523066680 on 2008-12-28 at 14:15 ]