I have an old DOS program that I'm running in Windows that has several menus the user can move through by entering numbers (which automatically take you to another menu - no need to press "enter"). At times, the user is required to type in the name of a file then press enter.
I am trying to automate the user's interaction with this program using a batch file. So far, with the help of this resource. I have been sucessful at automating user interaction through menus that only require inputing a number (without pressing enter). However, once the a menue requires typing in a file name and pressing enter, I run into problems.
Here is the code that works in automating the first two menu choices (4, then 6),
(echo 4
echo 6
) | execute.exe
After pressing 6, the next menu requires typing in a textfile name and pressing enter. However, even the above code (which I would think would stop at the interaction where I need to enter the name of the file) somehow automatically presses enter - meaning the file has no name. This is what is confusing me. Same result if I do something like this:
(echo 4
echo 6
echo sometext
) | execute.exe
or this:
(echo 4
echo 6
echo.
) | execute.exe
Inserting PAUSE also does not change anything. Somehow the batch file is treating the menu section that requires entering text and pressing enter in a particular way. Any help appreciated!