View Single Post
  #4  
Old 05-20-2016, 05:04 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,020
Hi ShawnVW,

Also, please be aware that WaitForString() cannot act on data that's already been echoed to SecureCRT. It has to be received while the script is running.

Quote:
For instance, I've had trouble trying to detecting a string that was part of a line, instead of the whole line. If a caption said "ENTER NAME AND ADDRESS", then
Code:
WaitForString("ENTER NAME AND ADDRESS")would work more often than
Code:
WaitForString("ADDRESS")
The problem with using only a partial string is that if that text could *ever* conceivably be received at a time when you really do not want to act on it, you could get unintended results.

In other words, if this was received from the remote:

WHAT IS YOUR ADDRESS?
ENTER NAME AND ADDRESS


The latter WaitForString() above is *actually* triggered by the first line and not the second. Perhaps the best way to be certain of the data received from the remote (to be certain there are not non-printable characters that are altering the results) is to capture a raw log (File menu).
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote