VOGONS


Color echo for text

Topic actions

First post, by TommyGun

User metadata
Rank Newbie
Rank
Newbie

Maybe this is a silly question but i cant get it.
I want to display a message using my conf file and i would like to see it colored like the help info from DOSBox.

What would be the correct command? I did some research on the web but those commands seem not to work.
TIA. 😊

Reply 2 of 10, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Do a search on "ANSI escape sequences", that should turn up what you're looking for.

Reply 3 of 10, by TommyGun

User metadata
Rank Newbie
Rank
Newbie
ripsaw8080 wrote:

Do a search on "ANSI escape sequences", that should turn up what you're looking for.

Yes but they do not work on DOSBox.

Thanks for the info. 😢

Reply 4 of 10, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yes but they do not work on DOSBox.

The welcome message and other colored text in command messages suggest otherwise. You are evidently not using the escape sequences correctly.

Reply 5 of 10, by TommyGun

User metadata
Rank Newbie
Rank
Newbie

Could you give me an example snippet on how I should use them correctly?

Reply 6 of 10, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Writeout the language file and look inside

Water flows down the stream
How to ask questions the smart way!

Reply 7 of 10, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie

actualy ansi sequence does works on dosbox (tested on stock build 0.74)

echo [1;37;44m

the problem is how to create the '' (real 0x1B characters)
above code will make IBM favorite color: bright white on blue

-fffuuu

Reply 8 of 10, by TommyGun

User metadata
Rank Newbie
Rank
Newbie

Joey_sw: so there's no actual way to get the escapade written via keyboard input?

Reply 9 of 10, by bloodbat

User metadata
Rank Oldbie
Rank
Oldbie

Alt-027

Reply 10 of 10, by TommyGun

User metadata
Rank Newbie
Rank
Newbie

Thanks to all. =)