I have a batch script that runs and then requires some input to move to the next step. The command window just sits open.
I have tried several things, but have not yet been able to get Macro Scheduler to focus on the *.cmd window and receive the text (using a send command followed by a press Enter) from the Macro so that the process continues.
I also searched the discussion boards but did not find a prior posting on this topic.
The script is...
Let>RP_WAIT=1
Let>RP_DISPLAYERROR=1
Run Program>C:\testbatch.bat
WaitWindowOpen>cmd.exe*
# Wait for it to gain focus.
SetFocus>cmd.exe*
# Send a single character to advance the batch process.
Send Character/Text>a
# Press Enter.
SetFocus>cmd.exe*
Press Enter
# Wait for the script to complete.
WaitWindowClosed>cmd.exe*
Command window not taking further input
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You have RP_WAIT=1. This causes the Run Program command to wait until the program it is running has terminated before the script continues. Therefore your script will stop until the batch file finishes.
That's not what you want. Remove the Let>RP_WAIT=1 line.
From the help file:
"By setting the RP_WAIT variable to 1 prior to issuing the Run Program command the script will wait until the program launched by Run Program has terminated before continuing. The default value of RP_WAIT is 0."
That's not what you want. Remove the Let>RP_WAIT=1 line.
From the help file:
"By setting the RP_WAIT variable to 1 prior to issuing the Run Program command the script will wait until the program launched by Run Program has terminated before continuing. The default value of RP_WAIT is 0."
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?