kristofer sweger Home
ANSIPLUS Home


Creating Application Batch Files

Almost all DOS applications should run without change when ANSIPLUS is installed. However, in a few cases it may be desirable to create a batch file that prepares the system for an application, runs it, and then cleans up afterward. There are four common reasons for creating these application batch files:

Many DOS application programs do not completely restore the video state on completion. The common problems seen (with examples in parentheses) are:

There are four simple options for restoring the ANSIPLUS video mode and colors after running an application that sets its own mode, palette or border color:

The options for controlling colors used by applications depend on whether custom colors are desired for the application and whether the application loads its own palette:

If you run your system using a certain set of ANSI key reassignments most of the time, but also run an application that sets up its own key reassignments, the PUSHKEYS.com and POPKEYS.com programs supplied with ANSIPLUS can be used in batch files to save the keys before an application is started and to restore them after it completes:

@ECHO OFF
PUSHKEYS
<application> %1 %2 %3 %4 %5 %6 %7 %8 %9
POPKEYS

If you want to set up a special set of key reassignments before running an application, just define the reassignments using the SETAPLUS utility program, and then save them to a file (in this example, named APPKEYS.com) with a SETAPLUS SAVEKEYS APPKEYS.com command. You then run APPKEYS.com in your batch file after saving the keys, but before the application:

@ECHO OFF
PUSHKEYS
APPKEYS
<application> %1 %2 %3 %4 %5 %6 %7 %8 %9
POPKEYS

In the event of a conflict between an ANSIPLUS feature and an application, the feature can be disabled before running the application and enabled again after it completes. For example, the following batch file turns off the screen saver while running an application:

@ECHO OFF
SETAPLUS DISABLE SAVER
<application> %1 %2 %3 %4 %5 %6 %7 %8 %9
SETAPLUS ENABLE SAVER

© Copyright 2000-2007, Kristofer Sweger. All rights reserved.
Rev. 10/16/07