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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading the screen

Status
Not open for further replies.

Matta25

Technical User
Jan 6, 2004
82
US
Has anyone done this:
When connected to a BBS with procomm and the BBS echos back to the screen "AECN: RECEIVED CLAIMS" I need to have an If statement to watch for this and if this echos to the screen then termmsg a "Successful", Else termsg a "UnSuccessful".
Thanks.
 
If the string always appears in a consistent manner (i.e. in response to a command you will always be sending), then you could use and if waitfor/endif structure. Otherwise, you would likely want to use a when target command that then calls a procedure that issues the termmsg command.


aspect@aspectscripting.com
 
Do you have an example of the when target command?
 
Here's an example I copied from the help file:

proc main
when TARGET 0 "First?" call FirstName
when TARGET 1 "Last?" call LastName
while $CARRIER ; Loop while connected.
yield ; Release ASPECT process time
endwhile
endproc

proc FirstName
transmit "John^M" ; Transmit first name.
endproc

proc LastName
transmit "Doe^M" ; Transmit last name.
endproc

aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top