批处理中最快的色彩功能是什么? [英] What is the fastest color function in batch?
问题描述
我最近尝试在一个cmd窗口中使用多种颜色。我发现的每种颜色功能(例如,以下一种功能: http:// www。 dostips.com/forum/viewtopic.php?p=41155 )非常慢,并且永远需要加载彩色地图。
I recently experimented with using multiple colors in one cmd window. Every color function that I find, (for example this one: http://www.dostips.com/forum/viewtopic.php?p=41155 ) are very slow, and it takes for ever to load a color map.
用彩色图问,我的意思是这段代码:
If you ask, by color map I mean this piece of code:
@echo off
for %%a in (0 1 2 3 4 5 6 7 8 9 a b c d e f) do (
for %%b in (0 1 2 3 4 5 6 7 8 9 a b c d e f) do (
call :color %%a%%b %%a%%b
if %%a%%b==1f call :color \n
if %%a%%b==3f call :color \n
if %%a%%b==5f call :color \n
if %%a%%b==7f call :color \n
if %%a%%b==9f call :color \n
if %%a%%b==bf call :color \n
if %%a%%b==df call :color \n
if %%a%%b==ff call :color \n
)
)
:color - some color function
每个颜色函数都在批处理中运行低。我想这是因为在%Temp%目录中创建了文件。
With every color function in batch this code runs very slow. I suppose it is because of creating files in %Temp% directory.
是否存在批量使用的颜色函数,如果一次使用很多颜色,该函数几乎可以立即工作?
Is there a color function in batch that works almost immediately if there are a lot of colors used at once? External programs or powershell counts too!
推荐答案
是的,那些纯批处理解决方案很慢。试试cecho: http://www.codeproject.com/Articles/ 17033 /批处理文件中添加颜色
Yes, those pure batch solutions are slow. Try cecho: http://www.codeproject.com/Articles/17033/Add-Colors-to-Batch-Files
这非常快,即使同时显示数百种颜色,也可以立即显示输出。
It is very fast and displays output immediately even when there are hundreds of colors displayed in the same time.
希望我帮助了:)
这篇关于批处理中最快的色彩功能是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!