当前位置:DOS资源站资料中心批处理教程 → 批处理实现精美的彩色字体

批处理实现精美的彩色字体

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2008-4-7 21:00:33
@echo off
title by jvive@cn-dos.net date: 08-04-03
set "a=abcdefg 哈哈o(∩_∩)o"
>%tmp%\tmp.vbs echo MyVar=MsgBox ("直接浏览点是,手动输入点否,退出点取消", 4163, "十六进位颜色属性配置演示"):Wscript.Echo MyVar
for /f "delims=*" %%i in ('cscript.exe //nologo %tmp%\tmp.vbs') do set MyVar=%%i
pushd %tmp%&del/q "%a%?" tmp.vbs 2>nul
if "%MyVar%"=="2" goto:eof
if "%MyVar%"=="6" goto:browse
if "%MyVar%"=="7" goto:input
goto :eof
:browse
set col=0 1 2 3 4 5 6 7 8 9 a b c d e f
title 点击右键暂停,左键继续
for %%a in (%col%)do for %%b in (%col%)do for %%c in (%col%)do for %%d in (%col%)do (
call:JV %%a%%b%%c%%d "%a%"
echo ---- 配色属性:%%a%%b%%c%%d
)
pause>nul&exit/b
:input
set "color="
title 请输入一个位16进制数(1-4位)[例如1EAf或2a]:
set /p color=
if not defined color goto:input
echo 颜色属性: %color%
set/p=颜色演示:<nul
call:JV %color% "%a%"
echo.
title 按任意键继续...
pause>nul
goto:input
:JV
set/p=<nul>"%~2"
findstr /a:%1 .* "%~2?" 2>nul