The problem I have is the waitfor is not always firing, or sometimes not being seen. I have tried the default (30), I have increased this to 50 and up.... but this doesn't seem to help. It dosen't see it always! It seems that the reply back is sometimes tooooo fast or a bit slow.
If I make this FOREVER it works all the time but the problem then it could hang if "for some reason" the waitfor text was incorrect. I need to keep checking every line and fail if this was not what was expected.
Help ! Am I doing something wrong?
;--------------------
Telnet_connect (IP1)
waitfor "login: " ;Check if able to log on
mess = "Unable to log onto "
Failure_Condition (mess)
transmit Uname[0]
waitfor "Password: "
mess = "User Name incorrect "
Failure_Condition (mess)
transmit Pass[0]
waitfor "Enter Selection: (1-8, q, ?) [q]>"
mess = "Password incorrect "
Failure_Condition (mess)
;-----
proc Failure_Condition
param string mess
integer statcond
if FAILURE
usermsg mess
writelogfile(mess)
statcond = 1
longjmp 0 statcond
else
endif
endproc
If I make this FOREVER it works all the time but the problem then it could hang if "for some reason" the waitfor text was incorrect. I need to keep checking every line and fail if this was not what was expected.
Help ! Am I doing something wrong?
;--------------------
Telnet_connect (IP1)
waitfor "login: " ;Check if able to log on
mess = "Unable to log onto "
Failure_Condition (mess)
transmit Uname[0]
waitfor "Password: "
mess = "User Name incorrect "
Failure_Condition (mess)
transmit Pass[0]
waitfor "Enter Selection: (1-8, q, ?) [q]>"
mess = "Password incorrect "
Failure_Condition (mess)
;-----
proc Failure_Condition
param string mess
integer statcond
if FAILURE
usermsg mess
writelogfile(mess)
statcond = 1
longjmp 0 statcond
else
endif
endproc