PC Review


Reply
Thread Tools Rate Thread

Colour in command prompt boxes

 
 
dan4793@hotmail.com
Guest
Posts: n/a
 
      30th May 2006
Hi guys,

I was wondering if it's possible to have differently coloured text in a
command prompt Windows.

When using a batch file, or a Perl script printing to STDERR or STDOUT,
is it possible to print a single word's text in, for example, red and
the rest in the default colour (say green, for example) all in the same
line? Or is it possible to print an entire line in red text? Can
background colours also be changed? If it is possible, can someone post
how to do it?

I'm using Windows 2000 SP 4 and Windows XP SP 2.

Thanks in advance.

 
Reply With Quote
 
 
 
 
foxidrive
Guest
Posts: n/a
 
      30th May 2006
On 30 May 2006 05:42:46 -0700, (E-Mail Removed) wrote:

> Hi guys,
>
> I was wondering if it's possible to have differently coloured text in a
> command prompt Windows.
>
> When using a batch file, or a Perl script printing to STDERR or STDOUT,
> is it possible to print a single word's text in, for example, red and
> the rest in the default colour (say green, for example) all in the same
> line? Or is it possible to print an entire line in red text? Can
> background colours also be changed? If it is possible, can someone post
> how to do it?
>
> I'm using Windows 2000 SP 4 and Windows XP SP 2.
>
> Thanks in advance.


Try this at the cmd line

color /?
 
Reply With Quote
 
dan4793@hotmail.com
Guest
Posts: n/a
 
      30th May 2006
Thanks, but that changes the entire window's colours. I want to change
only one word or one line in that window.

 
Reply With Quote
 
Phil Robyn
Guest
Posts: n/a
 
      30th May 2006
(E-Mail Removed) wrote:
> Thanks, but that changes the entire window's colours. I want to change
> only one word or one line in that window.
>


Download CTEXT (free) from http://users.cyberone.com.au/dbareis/

--
Phil Robyn
University of California, Berkeley
 
Reply With Quote
 
Timo Salmi
Guest
Posts: n/a
 
      30th May 2006
(E-Mail Removed) wrote:
> I was wondering if it's possible to have differently coloured text
> in a command prompt Windows.


Yes, it is.

51} How can I echo lines in different colors in NT scripts?
163586 May 1 2006 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
private.php?do=newpm&u= <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command prompt tool to minimize a command window AFTER it starts? Herb Martin Microsoft Windows 2000 CMD Promt 4 9th Apr 2009 09:52 PM
NO COMMAND PROMPT OR RECOVERY CONSOLE PROMPT =?Utf-8?B?QV9EVUI=?= Windows XP Performance 1 6th Aug 2006 09:06 PM
Changing prompt from C:\documents and settings\ to C:\ within command prompt Nulligan@gmail.com Windows XP General 4 1st Aug 2006 08:10 PM
4 command prompt dialog boxes on Log In Roy Microsoft Windows 2000 1 5th Mar 2004 07:58 PM
Permission Denied while running cscript command in command prompt Eric Microsoft Windows 2000 CMD Promt 0 3rd Oct 2003 08:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:27 PM.