maettig.com

More Control library for PowerBASIC (1994–1999)

← Back to the index of my DOS archive

Überweisungsauftrag (1992–1993)

It was my father who originally started writing this utility in Q-Basic. All his version did was asking for some lines of text the user wanted to print, and send them to our Epson LQ-550 dot matrix printer in just the right way that they fit the transfer forms our bank provided. It did not really had a user interface, and nothing was stored. I used his code and improved it as much as I could, added a preview, help, mouse support, an actual drop-down menu, a feature to store templates, and even color schemes. Everything was hard-coded to specific screen coordinates, and very hard to change.

Download the »Überweisungsauftrag« source codes (PowerBASIC)

McAfee Scan menu (1994)

One of the earliest examples of a text mode interface I wrote is a user friendly interface for the McAfee virus scanner. The McAfee software was a pure command line utility back then in 1994.

ARJ menu (1994)

When you look at the source code of these two dysfunctional iterations of a user interface for ARJ, you realize this must have been the reason why I started working on the More Control library. For me, in my world of DOS games and tools, the ARJ compressor by Robert K. Jung was the most popular. I almost exclusively used it for many years before I replaced it with the increasingly popular RAR. But this is an other story. ARJ did not had a user interface and I wanted to do the same as I did with the McAfee virus scanner before: build an interactive user interface.

My PowerBASIC text mode UI library (1994–1999)

Color schemes

When comparing some of the older source code files you can still see when I came up with the idea of color schemes. Before, each function call contained at least two color codes. This lead to hard to read code like inputbox(20, 0, 15, 1, 2, 1, "Vordergrundfarbe: ", 1). Usually this was not a problem for me. I knew the parameters of the few functions I used. I learned to recognize typical screen coordinates and color codes. locate 25, 1 is the first column in the last row, and color 15, 1 is white on dark blue. Yes, I memorized the 16 colors, and still can name most of them. But six numbers next to each other? And repeating the same color combinations many, many times in a program? There must be a better way.

The color schemes I came up with are source code files containing 33 global constants (also know as "equates" in PowerBasic) like %ColBoxText = 15. This means color scheme are code, can be included in any program with a simple $include "aqua.col", and code like color %ColBoxText, %ColBoxH makes the final program "magically" change color. I even wrote a visual editor for my color scheme files:

Menu of the More Control color scheme editor More Control color scheme editor with a preview on the top and a color selector on the bottom

The color scheme I refined the most and used most often is a bright "Aqua" scheme. An other, mostly gray and brown scheme is called "Virus" because it was the first one I came up with when I wrote an interface for the McAfee command line virus scanner I used back then in 1994:

Text Converter with the More Control color scheme Aqua Text Converter with the More Control color scheme Virus

I build other color schemes mimicking the look and feel of existing programs I used quite often at the time: Norton Commander is also white on cyan, but made use of strong black contrasts I did not liked very much. I started coding in PowerBASIC 2.1, which used black text in menus and dialog boxes, and later bought PowerBASIC 3.0, which had a refined, much brighter color scheme. The last skin in this row tries to mimic Windows 3.11.

Text Converter with the More Control color scheme Norton Commander Text Converter with the More Control color scheme PowerBASIC 2 Text Converter with the More Control color scheme PowerBASIC 3 Text Converter with the More Control color scheme Windows

I played around with green, which is a color scheme I used in the bank transfer printing tool I rewrote multiple times over the years, and blue. I went crazy by trying to use as many colors as possible while still being legible and usable, by maximizing contrast to a burning hell, or by trying to find the most ugly color combinations possible.

Text Converter with the More Control color scheme Green Text Converter with the More Control color scheme Blue Text Converter with the More Control color scheme Red-blue Text Converter with the More Control color scheme Hot Text Converter with the More Control color scheme Saskia

Text Converter (1996–1999)

I think my »Text Converter« utility was the »More Control« based program I used the most, by far. It uses a mixed interaction approach: You have to call it with the name of the text file you want to convert as the first command line parameter. No other command line parameter is supported. Everything else is done in a graphical user interface via mouse (pretty awesome back then) and keyboard, all drawn in the default 25 rows by 80 columns text mode I was used to and loved so much.

I still have three different versions in my archives, ranging from 1996 to 1999, each adding more features. The main reason why I created the first version was, obviously, to convert DOS text files to Windows and back. Or, to use the correct technical terms, to convert text files using the IBM PC's code page 437 to Windows-1252 (or ISO 8859-1) and back. This was at least true for the text files I wanted to convert, containing German umlauts, single quotes and very few other characters in the 128 to 255 »high ASCII« range. The utility uses the fact that the characters I found relevant are at different positions in the two 8 bit character sets to »detect« what charset the source file may use. It can even contain Umlauts from both character sets (yes, this really happened when I edited a file in DOS and Windows) and my Text Converter will clean this mess up. Other features of the first version are white space trimming at line ends and the end of the file, tabulator conversion and splitting long lines at word boundaries. Later versions added an (un)indention option to the word wrapping algorithm, an HTML tag stripper, case conversion and more options to convert for example line drawing characters to 7 bit ASCII text.

What I found labeled as version number 3.0 in my archives is a planned but never finished rewrite. I rearranged and relabeled the options more logically and removed unused ones. I learned how to read and manipulate the date and time stamp of files and added an option that allowed manipulations without changing any file attributes. I wanted to store all settings made interactively in a configuration file, but this was never implemented, apart from a dead »Save settings« button.

Version 2.0 is very close to a finished product, including a FILE_ID.DIZ, and mentioned in my real.fake release list.

Download the »More Control« library including the Text Converter source codes

Unfinished experiments

Download the »More Control« library source codes (PowerBASIC)