Results 1 to 6 of 6

Thread: How to change the line display color with the echo batch command?

  1. #1
    coolthinking Guest

    How to change the line display color with the echo batch command?

    My target is having a .cmd file with echo commands where I can setup for each
    echo command the display and the background colors I would like (red, blue,
    green...).

    Under Windows XP (SP3) it is not possible to use the ANSI.SYS neither the
    ANSI.COM.

    For faster process, I want to use the Windows environment and do not come
    back to the original DOS environment.

    Then, I would like to know how I can change the line display color with the
    echo batch command under Windows XP.

    I am confident it is still possible. How remains the big question :-)

    Best regards and thanks for the help.


  2. #2
    Pegasus \(MVP\) Guest

    Re: How to change the line display color with the echo batch command?

    Presumably you speak about the Command Prompt under WinXP,
    not DOS. DOS is a legacy operating system introduced some 30
    years ago. It does not exist under WinXP.

    If you wish to change the foreground/background colors of a
    console session the color.exe is probably your command. Type
    color.exe /? at the Command Prompt to see its syntax.

  3. #3
    coolthinking Guest

    Re: How to change the line display color with the echo batch comma

    Many thanks for your reply. However, it is not exactly the behaviour I would
    like.
    I am not interested in changing the foreground/background colors but only
    individual lines within the Command Prompt box.

    The purpose is having display text from my .cmd file with the textcolor I am
    interested in. As example, I would like having the first line in green text,
    the second one in red text, the thrid one in blue text, the forth one in
    green text, the fifth one in blue text.

    So, I must be ableI to define for each echo command the
    foreground/background colors.

  4. #4
    Pegasus \(MVP\) Guest
    Maybe TweakUI will help you - see here

    If not then I recommend you repost your question in a WinXP
    newsgroup in order to get a larger audience. It has really
    nothing to do with Windows Servers.

    OK. I will. Thnaks for your help and support.


    try this is ok with xpsp3...
    http://www.xs4all.nl/~robw/files/ansi.zip

  5. #5
    Join Date
    Nov 2011
    Posts
    2

    Re: How to change the line display color with the echo batch command?

    u can change. try the following:

    @echo off
    chgcolor 07
    echoj "How are "
    chgcolor 4f
    echoj "you"
    chgcolor 07
    echoj " today?"

    If you run the above batch file, you'll see a single line of output that asks "How are you today?. The word "you" is emphasized in bright white text on a red background.

  6. #6
    Join Date
    Nov 2011
    Posts
    2

    Re: How to change the line display color with the echo batch command?

    you may also try out COLOR 4f instead of chgcolor 04

Similar Threads

  1. How to change the command line resolution in Debian
    By Lucillee in forum Windows Software
    Replies: 5
    Last Post: 02-07-2011, 10:10 PM
  2. Replies: 3
    Last Post: 11-12-2010, 05:02 PM
  3. Replies: 3
    Last Post: 23-07-2009, 09:31 PM
  4. XP screen resolution change from command line ?
    By Kalav in forum Windows XP Support
    Replies: 2
    Last Post: 23-09-2008, 06:45 PM
  5. Replies: 1
    Last Post: 18-03-2007, 12:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,720,215.68334 seconds with 17 queries