Launching a DOS program with input

Some DOS programs can be launched with input. For example, you can launch some word processing programs and specify a text file to be loaded, all from the DOS prompt. The word processor starts, the text file is loaded automatically, and you're ready to start working. I wanted to be able to do this with The American Heritage Dictionary. Specifically, I wanted to start it with the word I wanted to look up and have it go right to it. One way to do this is to create a batch file that lets you input the word to be looked up and start the program. After some serious web-searching, I found a description of such a batch file in an old PC Magazine article.

One problem with the approach described in the article is that it uses an MS-DOS utility called FC.EXE. As most of you know, the palmtops don't come with a complete version of MS-DOS 5.0. I had to get FC.EXE from an old MS-DOS 5.0 distribution disk that I had. After making some adjustments to the original batch file, I came up with the following batch file, named LOOKUP.BAT. =

@echo off

c:

rem echo This will copy your input to the environment variable INPUT_

echo American Heritage Dictionary - Definitions Plus!

echo.

echo Lay your righteous word on me...

echo.

fc con nul /lb1 /n | time | find " 1: "> setinput.bat

echo.

echo Working...

echo

@echo off> enter.bat

echo set input_=%%4>> enter.bat

call setinput

del setinput.bat

del enter.bat

echo.

echo Done!

echo.

echo The definition is......

a: cd\defplus def %input_%

I added a new item to AppManager, setting it up to run this batch file. I specified the "+" as its hot key. The program needs only 105K of RAM to run, so now when I need to look up a word like "inveigle" from a past "X-Files" episode, I open Application Manager, hit the "+" key and enter my word. In two seconds flat I know it means: "To lead astray or win over by flattery or deceiving."