In the last post I said I would dive into the code in the next post, but I want to present the batch code changes from the original batch menu, and the revised batch menu using A-Batch first. The next post will be a code post.
Old DOS Batch Menu
As a reminder, here is the old DOS batch menu:
And here is the DOS batch code that presents it and gets the choice. I won’t go into the code branching because its irrelevant for menu purposes here:
@echo off cls echo. echo Choose: echo. echo 1 - Clipper 5.3 echo 2 - FoxPro 2.5 echo 3 - FoxPro 2.6a echo 4 - Turbo C echo 5 - Borland C++ echo 6 - Turbo BASIC 1.1 echo 7 - Power BASIC 3.5 echo X - Exit to DOS choice /c:1234567X /n
New DOS A-Batch Menu
Now, here is the new DOS batch menu using A-Batch:
And here is the DOS batch code the presents it and gets the choice:
@echo off abatch cls abatch back back lgray black abatch box 1 1 80 3 single white green abatch text 31 2 white green "B O O T M E N U" abatch box 20 8 40 12 double white blue abatch title 35 8 "Choose" yellow blue double white blue abatch text 30 10 lgray blue "1 - Clipper 5.3" abatch text 30 11 lgray blue "2 - FoxPro 2.5" abatch text 30 12 lgray blue "3 - FoxPro 2.6a" abatch text 30 13 lgray blue "4 - Turbo C" abatch text 30 14 lgray blue "5 - Borland C++" abatch text 30 15 lgray blue "6 - Turbo BASIC 1.1" abatch text 30 16 lgray blue "7 - Power BASIC 3.5" abatch text 30 17 lgray blue "X - Exit to DOS" abatch goxy 30 18 choice /c:1234567X /n
The line count increase to display the nicer menu is only 3. That last line with the command “goxy 30 18” isn’t required. I added it just to move the cursor under the choice column. The remainder of both scripts is the same, some ERRORLEVEL checking and branching to execute specific commands for each choice.
Next post will be A-Batch code.