ANSI Not Working

May 2, 2013
13
0
I downloaded Take Command 24 (24.02.46) to try it out. The first thing I noticed is that ANSI codes aren't being interpreted. For example, the sequence from the help file to set the display to bright cyan on blue, and clear the screen
echo ^e[44;36;1m^e[2J
simply displays as
←[44;36;1m←[2J

I have used all of the settings from the previous Take Command installed on my computer, where ANSI works fine. I have entered SETDOS /A1; ANSI Colors is checked on the Windows tab of the TCC Options; and I have tried all permutations of YES and NO for the ANSI and ANSIWin10 keys in the .ini file. None of these has made any difference.

I also noticed that there is no ansi64.dll (or ansi32.dll) in the program directory, so I copied ansi64.dll from the previous version's folder to the version 24 folder, but this didn't make any difference either.

I noticed in another thread that Rex asked the person to try something like CLS /C bri red on blue. For what it is worth, that does change the screen colours.

I am out of guesses and would appreciate any suggestions. In the meantime, I'm back to using version 22.
 

rconn

Administrator
Staff member
May 14, 2008
11,461
112
From the v24 help "What's New":

Take Command no longer includes ANSI32.DLL and ANSI64.DLL, and does not inject them into console apps for ANSI support. On Windows 10, Take Command will use the built-in console ANSI support. On Windows 7 & 8, if you want ANSI in CMD you will need to use a third-party app like ANSICON. ANSI is still supported for TCC internals.
 
May 2, 2013
13
0
So ... in practical terms it sounds like 20+ years of batch files that use ANSI for colour output are now broken, and I am forever stuck on version 22 until I re-write them. Correct?
 

rconn

Administrator
Staff member
May 14, 2008
11,461
112
So ... in practical terms it sounds like 20+ years of batch files that use ANSI for colour output are now broken, and I am forever stuck on version 22 until I re-write them. Correct?
Not correct. TCC still supports ANSI for its output (OPTION / Windows / Colors / ANSI colors). Also, if you're using Windows 10, you can have ANSI for everything using the console.

The only thing you can't have with v24 is ANSI for external apps when you're running Windows 7 or 8. (TCMD had this ability for a couple of years, but Microsoft made it difficult-to-impossible to continue supporting that with their Windows 10 console changes.) As the help says, if you need ANSI for third-party apps for Windows 7, you can run ANSICON.
 
May 20, 2008
9,912
71
Syracuse, NY, USA
What operating system are you using and where are you expecting, but failing, to see ANSI ... in a TCC console, in TCC in a TCMD tab, in a CMD console, in CMD in a TCMD tab?
 
May 2, 2013
13
0
I am running Windows 10 (version 10.0.17763.379). I have the same result in both TCC and a tabbed window:
2280
and
2283

ANSI Colors is turned on in the options
2282

What else should I be looking at as a fix?
 
May 20, 2008
9,912
71
Syracuse, NY, USA
I recommend letting Windows 10 handle the ANSI; it will affect all console apps. Start TCC in a stand-alone console (not in TCMD). In the console's properties (right-click on upper-left control icon ... Properties)... Options ... do not check "Use legacy console".

Find out what your INI file is with "ECHO %_ININAME".

Open the INI file in an editor and make sure you have exactly three references to "ANSI", namely these.
Code:
[4NT]
ANSI=Yes
ANSIWin10=Yes
[TakeCommand]
ANSI=No
All that works well here.
 
  • Like
Reactions: Charles G