0

My goal is to make my text blinking in the console. I know how to do that using a timer (Link), but I want to do this using ANSI codes not like Here. I am aware of the fact, that ANSI codes work in console. Because colors, bold and underline work fine. Blinking text should look like that: "Normal \e[5mBlink", but it is not working. I know projects like SadConsole that provide this option, but I do not know how it works. So, could anyone help me with this problem?

PS. Here is the reference that I know about ANSI: Link

John
  • 8,106
  • 4
  • 44
  • 65
Kacper G.
  • 622
  • 8
  • 29
  • Possible duplicate of [Blink text in C#](https://stackoverflow.com/questions/737195/blink-text-in-c-sharp) – SᴇM Jun 21 '18 at 11:02
  • See https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences. It seems that the Anniversary Update for Windows 10 provides this functionality out of the box. – ckuri Jun 21 '18 at 11:03
  • @SeM I think my question is not a duplicate, because I want to use ANSI codes, not timers – Kacper G. Jun 21 '18 at 11:03
  • Supposedly https://stackoverflow.com/questions/49145316/why-no-text-colors-after-using-createfileconout-to-redirect-the-console describes how to enable it, although it didn't work on my machine. – ckuri Jun 21 '18 at 11:36
  • They should have reactivated the ansi in newer Windows 10 (see [here](https://stackoverflow.com/q/16755142/613130)). Note that [you must activate them](https://superuser.com/questions/413073/windows-console-with-ansi-colors-handling/1050078#1050078) – xanatos Jun 21 '18 at 11:50

2 Answers2

0

In the msdn "Console Virtual Terminal Sequences" reference that contains the supported ansi sequences there is no blinking effect. Sorry :-)

To be precise, under Text Formatting:

0 Default Returns all attributes to the default state prior to modification

1 Bold/Bright Applies brightness/intensity flag to foreground color

4 Underline Adds underline

24 No underline Removes underline

7 Negative Swaps foreground and background colors

But there is no 5, that is Blink.

xanatos
  • 106,283
  • 12
  • 188
  • 265
-1

Blink does not work with most of the terminal emulators, works in the tty and XTerm.