Wait for the specified data to be received from the host. Since VT emulation is character based, FlexTerm can't wait for text to appear at a particular position on the screen. When macros are recorded, this is automatically generated to produce accurate screen navigations. 


FlexScreen.WaitForStringReceived(Text, [WaitMSec])



String, input

Text string to wait for.


Integer, input, optional

Number of milliseconds before the wait method will timeout.


If the optional WaitMSec parameter is specified, it will be used as the maximum wait time before a timeout error occurs. If unspecified, FlexScreen.WaitTimeoutMSec will be used instead.

When a timeout occurs, a run time error will be generated and the macro will stop unless On Error Resume Next is in effect, in which case, WaitForStringReceived will return a false value.


Sub Main()

  Ok = FlexScreen.WaitForStringReceived("Userid")

  Ok = FlexScreen.SendKeys("MyUserID")

  Ok = FlexScreen.SendKeys(FlexKey.VT_RETURN)

End Sub