来个更快速和更高压缩比的。
生成器
-
- @Echo off&color a&setlocal EnableDelayedExpansion
- set echo=
- if defined %1 echo;echo;&(FOR /L %%S IN (1,1,6) Do echo.
- echo %echo% 生成器
- Echo %echo%请将你要转换的点阵字本文文档 直接拖到本批处理上.
- FOR /L %%S IN (1,1,5) Do echo.
- Echo %echo%请在没有空格 与 特殊字符的 路径下操作.
- pause>nul&Exit)
-
- for /f "delims=" %%a in (%~1) do (
- set str=%%a
- if not defined 背景 set 背景=!str:~,1!
- for %%b in ("!背景!") do (set str=!str:%%~b=!)
- if defined str set 前景=!str:~,1!&goto :ok
- )
- :ok
- set "asc=01234567890ABCDE'FGHI@#$.abcdefghijklmnopqrstuvwxyz"
- for /l %%a in (0,1,50) do (set #!asc:~%%a,1!=%%a&set $%%a=!asc:~%%a,1!)
- set dec=
- for /f "delims=" %%a in (%~1) do (
- set str=%%a
- set str=!str:%背景%=0!
- set str=!str:%前景%=1!
- set str=!str:01=0 1!
- set str=!str:10=1 0!
- if "!str:~,1!" equ "1" (set dec=!dec! `) else (set dec=!dec! )
- for %%b in (!str!) do (
- set var=!asc!%%b
- set /a vum=#!var:~-51,1!
- for %%c in (!vum!) do (set dec=!dec!!$%%c!)
- )
- )
- echo !背景!!前景!!dec!>%~dp1\bendec.txt
- pause
复制代码
解释器
-
- @Echo off&color a&setlocal EnableDelayedExpansion
- set echo=
- if defined %1 echo;echo;&(FOR /L %%S IN (1,1,7) Do echo.
- echo %echo% 解释器
- Echo %echo%请将你要转换的点阵字本文文档 直接拖到本批处理上.
- FOR /L %%S IN (1,1,5) Do echo.
- Echo %echo%请在没有空格 与 特殊字符的 路径下操作.
- pause>nul&Exit)
- set "asc=01234567890ABCDE'FGHI@#$.abcdefghijklmnopqrstuvwxyz"
- for /l %%a in (0,1,50) do (set #!asc:~%%a,1!=%%a)
- for /l %%a in (1,1,10) do (set spac=!spac! )
- Mode con cols=127 lines=44
- set #前景=背景&set #背景=前景
- for /f "delims=" %%a in (%~1) do (
- set str=%%a
- for /f "tokens=1,2 delims=*" %%l in ("!str:~0,1!*!str:~1,1!") do (set 前景=!spac: =%%l!&set 背景=!spac: =%%m!)
- set str=!str:~2!
- for %%b in ("!str: =" "!") do (
- set str=%%~b
- if "!str:~,1!" equ "~" (set 当前=背景) else (set 当前=前景)
- set num=!asc!!str!
- set /a vum=#!num:~-50,1!
- for /l %%c in (0,1,!vum!) do (
- for %%d in ("!str:~%%c,1!") do (
- for /f "tokens=1,2" %%e in ("!当前! !#%%~d!") do (
- set /p=!%%e:~,%%f!<nul
- set 当前=!#%%e!
- )
- )
- )
- echo;
- )
- )
- pause
复制代码
|