VOGONS

Common searches


First post, by Sanders

User metadata
Rank Newbie
Rank
Newbie

The following image is just an example from DOS BOx (not directly DOS Box related)
The image shows a blue colored window for highlighting text in DOS. Is there a special DOS command to create those windows?
I remember a friend who built a whole menu structure using only those windows to start programs directly from DOS.

Attachments

Reply 1 of 5, by weedeewee

User metadata
Rank l33t
Rank
l33t

Look up ASCII table and ANSI color codes. ░▒▓█▓▒░

Right to repair is fundamental. You own it, you're allowed to fix it.
How To Ask Questions The Smart Way
Do not ask Why !
https://www.vogonswiki.com/index.php/Serial_port

Reply 2 of 5, by pan069

User metadata
Rank Oldbie
Rank
Oldbie

If I'm not mistaken, and remember correctly (sorry, it's been almost 30 years), but you can use TheDraw to draw those ANSI graphics and export them in various formats. One of them should be that can be used to "type"/output from/within DOS.

https://en.wikipedia.org/wiki/TheDraw

Reply 3 of 5, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

If you have ANSI.SYS loaded then it's possible to prepare a text file that would appear this way when you print it with type command, or even use ANSI codes in a batch file using echo.
Otherwise it's possible to print colored text from within an exe/com program, using any programming language. In this case ANSI.SYS is not needed.

Reply 4 of 5, by Sanders

User metadata
Rank Newbie
Rank
Newbie

I was able to create something like I was searching for with the clues I get from you and some other sources in the internet. I just want to share the solution.

Filename
ColorBox.txt
File size
1.28 KiB
Downloads
91 downloads
File license
CC-BY-4.0

Attachments

Reply 5 of 5, by doshea

User metadata
Rank Member
Rank
Member
pan069 wrote on 2021-03-13, 08:52:

If I'm not mistaken, and remember correctly (sorry, it's been almost 30 years), but you can use TheDraw to draw those ANSI graphics and export them in various formats. One of them should be that can be used to "type"/output from/within DOS.

https://en.wikipedia.org/wiki/TheDraw

Yes, this is correct. This is how I did it too, except you need to load ANSI.SYS (or equivalent) as Azarien mentioned. TheDraw can load and save in various file formats, and lets you design coloured text without having to know the escape sequences. If you save in "Ansi" format as say MENU.ANS, then you can run this simple DOS command that pano69 mentioned to display that file with the colour, so long as ANSI.SYS is loaded:

TYPE MENU.ANS

I don't remember TheDraw all that well but I just had a play with it and forgot it even supported layers, it was certainly a lot easier than creating those ANSI sequences by hand.


Another alternative: there are also various utilities out there which are less flexible but simply let you do plain windows, e.g. Norton Utilities includes Batch Enhancer (BE.EXE) with a few relevant commands such as:

screenshot.png
Filename
screenshot.png
File size
3.64 KiB
Views
606 views
File license
CC-BY-4.0

There are probably lots of shareware alternatives from the '90s out there too.

You can make things look a lot more fancy in TheDraw or by making raw ANSI sequences, e.g. you can make a gradient from the characters weedeewee posted, whereas BE will always draw fairly plain boxes, but something like BE can be useful if you want to be more interactive, e.g. move the cursor to a particular point and output some string from a variable in your batch file rather than always outputting the same text.