Hopefully "ScriptingTipsAndTricks" helps you with your batch file or vbscript scripting :-)
[Bottom][Contents][Prev]: My Tools (Tools written by me - Dennis Bareis)[Next]: FILTER$.EXE (toolbox)
\->Useful Programs->My Tools (Tools written by me - Dennis Bareis)->CTEXT.EXE (colored console output)

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}"



Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: My Tools (Tools written by me - Dennis Bareis)[Next]: FILTER$.EXE (toolbox)


ScriptingTipsAndTricks© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday September 07 2014 at 12:50pm
Visit ScriptingTipsAndTricks's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.