CTEXT.EXE (colored console output) |
I wrote this program years ago and most other programs that use color output to the screen will be based on my code no one had done it before (its not officially supported and is "tricky") and as I provided my source code it freely the many times it was requested :-)
It doesn't need an "ansi.sys" driver and better yet it doesn't effect the output if its redirected.
The installed shortcuts that execute the example code use this program to alter the colours.
SYNTAX: CTEXT.EXE |
[]-------------------------------------------------------------------------[] | CTEXT.EXE : Version 2K.232 (C)opyright Dennis Bareis 2000 | | http://www.labyrinth.net.au/~dbareis/index.htm (dbareis@labyrinth.net.au) | []-------------------------------------------------------------------------[] If you are like me you are not happy that windows does not support ANSI color codes on the command line. This program allows you to display text in different colors in batch files etc. Simply specify the text (surrounded by double quotes if required) and imbed any control codes as follows (codes start with '{', end with '}'): {{ = Escape control character ('{') {\n} = New Line {color} = 1. Hex code for color ("0c" = bright red on black) 2. Color "bred on black", "green" etc Valid colors names are: "BLACK", "BLUE", "GREEN", "CYAN", "RED", "MAGENTA", "BROWN", "WHITE", "GRAY", "BBLUE", "BGREEN", "BCYAN", "BRED", "BMAGENTA", "YELLOW", "BWHITE" Note that there need be no text as in the following fragment from a batch file: ctext.exe "{bred on black}" echo ERROR: This message is in bright red on black ctext.exe "{07}"