Old School ANSI Support in Windows

Discussion in 'Software' started by PEBKAC, Mar 11, 2011.

  1. PEBKAC

    PEBKAC Private First Class

    Has anyone successfully enabled support for ANSI escape sequences in the Windows CMD environment? I'd love to know a Windows native way of enabling ANSI but would settle for a third party utility as well. In my experience, Windows "kind of" supports ANSI in the 16-bit COMMAND.COM interpreter but only if ANSI.SYS is loaded in the CONFIG.NT and only if the COMMAND.COM executes the ANSI code as a passed parameter. To explain...

    On a Windows XP computer, I created a text file named "TEST.TXT" which contains "(ESC)]36mTest" ("ESC" being the ASCII 27 escape code). If I launch CMD.EXE and then issue the command "TYPE TEST.TXT", I see "(ESC)]36mTest". If I launch CMD.EXE /A and issue the same command, I get the same result. If I run COMMAND.COM and issue the same command, I get the same result. However, if I open CMD.EXE and run "COMMAND.COM /C TYPE TEST.TXT", I see the word "Test" in Cyan, as I would expect.

    The end result is that I want to be able to create batch files (as CMDs) containing ANSI escape sequences for the X & Y cursor positioning. (It would also be ultra cool to re-live my BBS days of viewing ANSI art from the CLI.) :) If I overlooked a previous post on this subject, please point me in the right direction.

    Thanks
     
  2. GermanOne

    GermanOne Guest

    Unfortunately there is no way to run cmd with different colors in the same window. You need a third party tool like my own one or this one with some more options.
     
  3. PEBKAC

    PEBKAC Private First Class

    If color was the only thing I was looking for, I could probably make do, to some extent, natively, with the "COLOR" command. What I'm primarily looking for is the ability to designate cursor position... (ESC)]5D or (ESC)]s and (ESC)]u

    Thanks!
     
  4. GermanOne

    GermanOne Guest

    I see.
    Try to run old DOS software in DOSBox.
    CMD doesn't support these things, so you have to use some small tools as suggested. Have a look at gotoxy to set the cursor to a defined position...
    If these things won't help I'm at my wits end :)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds