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
12,404
152
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
12,404
152
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
11,535
103
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
11,535
103
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
Similar threads
Thread starter Title Forum Replies Date
nickles ANSI Colors Windows 7 no longer working Support 6
vefatica ANSI, PROMPT ... ??? Support 1
vefatica ANSI??? Support 9
samintz ANSI issues Support 3
FreezerBurnt ANSI Prompt messes up list output. Support 39
samintz ANSI Colors Support 33
samintz WAD ANSI issue Support 3
AndrewJ TakeCommand v23 + ANSI color sequences leads to black on black text Support 6
vefatica ANSI, ANSIWin10 ... ? Support 2
vefatica Win10's ANSI doesn't like 2>NUL Support 10
vefatica How do I see Windows 10's ANSI in action? Support 3
M Please explain TCMD's ANSI x3.64 support Support 4
M ANSI is used to show files instead of OEM in version 17 to 19 ! Support 5
vefatica ANSI Support 11
vefatica WAD ANSI still misbehaves with build 35 Support 36
vefatica ANSI misbehavior????? Support 4
Peter Murschall UNICODE mixed with ANSI Code Support 11
J Piping ANSI control sequences through 'type' Support 4
gschizas Take Command (Environment) doesn't show v2 ANSI colors Support 30
B How to? Convert Unicode to ANSI Support 1
D Can ANSI escape sequences be used in keystroke aliases? Support 8
vefatica WAD ANSI <ESC>[K Support 5
M Ansi.sys and old Dos programs Support 7
R ansi.sys ?? Support 15
E Shorter prompt / ANSI codes support Support 10
P PSHELL not working in TCC 26 Support 9
H @XMLXPATH not working in v28 Support 5
twaterloo FolderMonitor for the 1st time not working Support 5
Tim Rowe NTFS Descriptions not working Support 13
J Batcomp still not working for me in TCMD27 Support 1
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
M Why did BEEP just quit working? Support 12
cgunhouse SETLOCAL not working in BDEBUGGER Support 9
thorntonpg option /u not working The directory name is invalid Support 5
Charles Dye Is the "File Associations" installer dialog working? Support 4
H @ceiling @floor @int not working version 21.01.63 Support 9
K Command Line Selection Not Working Support 12
G Extended directory search not working Support 4
B %@fileseek is not working ? Support 2
C "Take Command has stopped working" Support 1
H New command not working well in Windows 7 Support 4
C "TakeCommand has stopped working" Support 3
N ping DNS lookup not working Support 1
N Updater/silentall not working? Support 1
K Help Not Working Support 11
R Fixed set /r has stopped working in build 35 Support 4
U Keys and IDX not working Support 11
Jesse Heines How to? Everything Tool Not Working After Version 20 Installation Support 8
WavSlave Fixed LIST /U not working in TCC v19 Support 5
Jay Sage %_selected no longer working Support 15

Similar threads