Color in batch programs
Moderator: DosItHelp
-
- Posts: 129
- Joined: 08 Feb 2016 20:25
Color in batch programs
Questions on advantages/features/drawbacks to the various color utilities mentioned in the forums.
I've used colorshow.exe from Aacini: http://www.dostips.com/forum/viewtopic.php?f=3&t=3428
Also, another batch solution found on stackoverflow that I think was made by jeb - it mainly uses findstr.
And I also saw this post from carlos referencing "out.exe" :http://www.dostips.com/forum/viewtopic.php?f=3&t=4881&start=15#p41335
I know the findstr solution is slower than the colorshow.exe - and also colorshow.exe seems more robust in its features/options but I haven't used out.exe
So can anyone comment on any other advantages/features/drawbacks of these utilities?
I've used colorshow.exe from Aacini: http://www.dostips.com/forum/viewtopic.php?f=3&t=3428
Also, another batch solution found on stackoverflow that I think was made by jeb - it mainly uses findstr.
And I also saw this post from carlos referencing "out.exe" :http://www.dostips.com/forum/viewtopic.php?f=3&t=4881&start=15#p41335
I know the findstr solution is slower than the colorshow.exe - and also colorshow.exe seems more robust in its features/options but I haven't used out.exe
So can anyone comment on any other advantages/features/drawbacks of these utilities?
Re: Color in batch programs
what about powershell and .net solutions? They are faster than FINDSTR and do not require external binaries.
Re: Color in batch programs
That depends on the OS, on mine both powershell and .net are external binaries and .net is bloated.
The findstr program is native and slow.
Aacini's binary is fast, requires no installation, and can be build from native batch.
The findstr program is native and slow.
Aacini's binary is fast, requires no installation, and can be build from native batch.
-
- Posts: 129
- Joined: 08 Feb 2016 20:25
Re: Color in batch programs
Any comments on the differences between the "colorshow.exe" and "out.exe" utilities?
p.s. it is difficult to search the forum for "out.exe" because it won't search the whole string, but rather separates them into two words and refuses to run the search.
p.s. it is difficult to search the forum for "out.exe" because it won't search the whole string, but rather separates them into two words and refuses to run the search.
Re: Color in batch programs
mirrormirror wrote:p.s. it is difficult to search the forum for "out.exe" because it won't search the whole string, but rather separates them into two words and refuses to run the search.
There is this really cool search engine called google.
http://lmgtfy.com/?q=%22out.exe%22+site%3Adostips.com
-
- Posts: 129
- Joined: 08 Feb 2016 20:25
Re: Color in batch programs
There is this really cool search engine called google.
http://lmgtfy.com/?q=%22out.exe%22+site%3Adostips.com
Did that already but just wanted to mention the search issue I had.
Re: Color in batch programs
mirrormirror wrote:just wanted to mention the search issue I had.
I've found that many forum search engines are limited. Squashman's suggestion is what I use too, with autohotkey to drive it using a hotkey.
Re: Color in batch programs
npocmaka_ wrote:what about powershell and .net solutions? They are faster than FINDSTR and do not require external binaries.
Excuse me, but I disagree. The findstr.exe file is 30208 bytes long and powershell.exe is 474624 bytes (in my Win 8.1 computer), so if a Batch file use findstr/powershell methods to show text lines in color, I would not be surprised if the findstr method run at least 10 times faster than the powershell one. Perhaps it would be interesting to complete a timing test...
Antonio
-
- Posts: 129
- Joined: 08 Feb 2016 20:25
Re: Color in batch programs
Just to add a bit of info / comparison between out.exe (from carlos) and colorshow.exe (from antonio):
out.exe: found here:http://consolesoft.com/p/out/
Unicode output
The text accept the next regular expressions:
\b backspace
\r carriage return
\d new line
\t horizontal tab
colorshow.exe (find here in forums viewtopic.php?f=3&t=3428 )
Not sure of unicode functionality - I do not need it at the moment.
From the documentation, it seems to have more functionality and be a bit more flexible for displaying variables, justifying text, etc.
I have only used colorshow.exe so I can't compare speed, etc.
out.exe: found here:http://consolesoft.com/p/out/
Unicode output
The text accept the next regular expressions:
\b backspace
\r carriage return
\d new line
\t horizontal tab
colorshow.exe (find here in forums viewtopic.php?f=3&t=3428 )
Not sure of unicode functionality - I do not need it at the moment.
From the documentation, it seems to have more functionality and be a bit more flexible for displaying variables, justifying text, etc.
I have only used colorshow.exe so I can't compare speed, etc.
-
- Posts: 208
- Joined: 26 Dec 2013 09:28
- Contact:
Re: Color in batch programs
What about this one?
ANSI escape-oriented PowerShell script: https://github.com/ildar-shaimordanov/c ... r/ansi.bat
Reading from command line arguments
Reading from pipeline
Reading from pipeline of few commands
ANSI escape-oriented PowerShell script: https://github.com/ildar-shaimordanov/c ... r/ansi.bat
Reading from command line arguments
Code: Select all
ansi "\e[47m \e[0m\n\e[44m \e[0m\n\e[41m \e[0m"
Code: Select all
echo \e[47m \e[0m\n\e[44m \e[0m\n\e[41m \e[0m | ansi
Code: Select all
(
echo \e[47m \e[0m
echo \e[44m \e[0m
echo \e[41m \e[0m
) | ansi