ansicon icon indicating copy to clipboard operation
ansicon copied to clipboard

color don't change

Open Kobe972 opened this issue 4 years ago • 14 comments

It can't change the color. i.e., [...m has no effect. Win10 x64.

Kobe972 avatar Oct 25 '21 01:10 Kobe972

You're going to need to be way more specific. Colour is tricky to demonstrate via copy/paste, so assuming nothing's working I'll demonstrate with move cursor right:

C:\Projects\ansicon>ver

Microsoft Windows [Version 10.0.19041.388]

C:\Projects\ansicon>ansicon --version
ANSICON (64-bit) version 1.89 (29 April, 2019).

C:\Projects\ansicon>ansicon -e ^[[4Cmove right
    move right

C:\Projects\ansicon>echo %ANSICON_VER%
189

C:\Projects\ansicon>echo ^[[4Cmove right
    move right

adoxa avatar Oct 25 '21 01:10 adoxa

I've the same problem too

C:\Windows\System32>ver

Microsoft Windows [Version 6.1.7601]

C:\Windows\System32>ansicon --version
ANSICON (64-bit) version 1.89 (29 April, 2019)

acuna-public avatar Mar 11 '22 16:03 acuna-public

Which gives me the same problem: lack of detail - all I can tell from that is you're using 64-bit Win7 and either ansicon is in the PATH or you've installed to system32 (bad idea). Does ansicon -e work? Did it install? Is it cmd that's not working, or some other program?

adoxa avatar Mar 12 '22 00:03 adoxa

Hello, ansicon -e show nothing and didn't help( And yes, it's only cmd till.

acuna-public avatar Mar 12 '22 20:03 acuna-public

Does ansicon -e ^[[4Ctest (where ^[ is the escape character, Ctrl+[) show     test (i.e. four spaces before test)?

adoxa avatar Mar 13 '22 01:03 adoxa

No, it's not. But it's worked before I've bought another SSD and change its letter, I've even search somethig according with ansicon in regedit and found only its path in Path variable (which is correct). Will be glad it can be helpful.

acuna-public avatar Mar 14 '22 22:03 acuna-public

Do a log and send me the output. Here's mine.

C:\>ansicon -l5 -e ^[[4Ctest
    test

C:\>type %temp%\ansicon.log
ANSICON (64-bit) v1.89 log (5) started 2022-03-15 9:59:44

ansicon (11144): WriteConsoleW: 3 "\e[m"
ansicon (11144): WriteConsoleW: 8 "\e[4Ctest"
ansicon (11144): WriteConsoleW: 1 "\n"
ansicon (11144): Primary thread detached, exiting process
ansicon (11144): Terminating

adoxa avatar Mar 15 '22 00:03 adoxa

I'm so sorry, was busy this days. I forgot to run ansicon -i. But I don't remember that I did it before. But okay, seems I forgot about it, thanks for awesome project... Can I ask you, why does anybody use it on another versions of Windows, because as I know Windows 10 support colors out of the box.

acuna-public avatar Mar 28 '22 00:03 acuna-public

Windows 10 doesn't quite support colors out of the box - programs must still enable the terminal sequences.

adoxa avatar Mar 28 '22 00:03 adoxa

@acuna-public , a lil tip, make a bat/.cmd file for this task and then do you need only kick on the script-file and all is done what's with ansicon have to do...

@adoxa , Jason, could you onclude the WinNT 10/11 colorcode into ansicon, or it is not other ? (should i make a new issue?) and the Hex-colors, it is give the possible for transparency in %, so these not only 6 digits, be now ?7? should be make more enhanced and supports that.. because, if taked code from a html5 page in hex-color

blackcrack avatar Mar 28 '22 05:03 blackcrack

I did actually make a start on passing through SGR sequences, but got sidetracked and never went back to it. Bit busy atm, but I'll get there...

adoxa avatar Mar 28 '22 06:03 adoxa

@adoxa yes, but is sequences only one way to get colors in cmd, or I've missed something?

acuna-public avatar Apr 02 '22 19:04 acuna-public

@blackcrack thank you, all is working without it, I've simply forgot to call ansicon -i.

acuna-public avatar Apr 02 '22 19:04 acuna-public

@adoxa yes, but is sequences only one way to get colors in cmd, or I've missed something?

I'm not sure what you're asking. If you want, e.g. cmd's echo command to have colors, then yes, sequences are the only way (well, apart from patching/hooking cmd itself and directly modifying the echo command to support colors in some way). If you want a batch file to have colored output then there are a variety of external tools to do that.

adoxa avatar Apr 03 '22 01:04 adoxa