Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read the line of current prompt 1

Status
Not open for further replies.

flipProg76

Programmer
Aug 16, 2007
5
I need to read the question on the screen in order to run specific code. I will have one of two scenarios

For example:
1) "Do you want to continue <Press Y to continue or X for exit>?" with the command prompt is waiting

2) "No data is returned <Press the desired menu number>" with the command prompt waiting

How do i read that question from the screen...does any one know the command(s) used.

Can i use 'termreads' or 'termgets'? If so how do I use it?

thanks in advance
 
You could use termgets or termreads to do this, but I think a piece of code another ASPECT user contributed to my site sometime in the past would work better. It uses three when target commands to watch for up to three unique strings and returns which string was received. You can download it from the below link:


 
Thanks for the help. I used the following. I had to put a pause in there to capture the correct text.


string sLine

pause 1
termgets $ROW 0 sLine

if strfind sLine "STRING TO SEARCH FOR"
; do code
else
; do other code
endif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top