"When Target" is the standard way to look for more than one prompt simultaneously. The only complicated aspect (no pun intended) of "When target" is that you have to call a subroutine. You can use a waitfor in the normal procedure and "When target" to interrupt the process with a different response.
Here is a fictitious example where a script will send as return key if the normal waitfor is detected or a "logoff" and exit command if the when target is detected:
Proc Main
when target 1 "last Page" call SessionEnd
transmit "Reports Please^M"
Waitfor "to next page" forever
transmit "^M"
when target 1 clear
EndProc
The when command will remain active until you include the "When Target clear" statement shown in the example. Robert Harris
Communications Advantage
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.