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

Making Script stop after receiving error message?

Status
Not open for further replies.

Stanggrn

Technical User
Feb 13, 2003
12
US
I am trying to completely stop a command if it sees a deny response from the machine. Below is a script that I call to get it to stop.

Code:
procError
   usermsg  "!!!THIS COMMAND HAS BEEN TERMINATED!!! - Please VERIFY input.  After verification enter correct ACCESS IDENTIFIER (AID)"
   exit 
endproc

The problem is I tried to use the following command to call that proc
Code:
string B="CTAG DENY"

when B call Error

And it didnt call that proc or see the "CTAG DENY" statement from the machine. Someone's help would be appreciative.

Thanks
Jason
 
The format of the command you want to use is:

when target 0 B call Error

When target tells the script to call Error when the text in string B is received by Procomm. 0 is just an index value (you can have more than one when target command active as long as each uses a different index value).
aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top