I am new to the Micro Focus Reflections Desktop Pro version (v16) of software. The programming language structure is substantially different from the Previous version of Reflections (v14). I would like to see if someone can post or provide a snippet of code that show the differences in using the various WaitForStrings methods that are now found in the new version of Pro?

WaitForStrings4 ??

================================================== ===================================
here is an example of how the older version of Reflection use to handle the waitforstrings method. I understand how it works because the help file for the older version gave a very good example of how it was used.
Syntax WhichString = object.WaitForStrings(StringsArray, [Timeout], [Options])


Session.Parent.Application.WaitForStrings (StringsArray, [Timeout], [Options])


StringsArray Argument Type: String array
Specifies one or more strings for which to wait. Reflection considers case (the incidence of uppercase and lowercase letters) in testing incoming data for a matching string.
Timeout Argument Type: String
Specifies the amount of time to wait for one of the specified strings to be received. The string is specified in HH:MM:SS.hh format. If this argument is omitted or is empty (""), Reflection waits indefinitely if none of the strings is received.

Options Argument Type: Enumeration
Specifies additional, non-default behavior for the method. There are three options for this method:
rcAllowKeystrokes - Specifies that the user is allowed to enter keystrokes in the terminal window during the wait.

rcNoDisplay - Specifies that incoming datacomm characters should not be displayed in the terminal window.

rcNoTranslation - Specifies that the StringsArray parameter contains binary data. Binary data is matched exactly as it is received from the host without performing host-to-PC character set translation.

You can combine two or more options using the addition operator (+). For example: rcAllowKeystrokes + rcNoDisplay.


WhichString Return type: Integer
A number indicating which item in the StringsArray array was found. If the first item is found, 1 is returned; if the second item is found, 2 is returned; and so on. If none of the strings are received before the Timeout time expires, False (0) is returned. If no Timeout is specified, this method cannot return False.
================================================== ===================================


This example waits 20 seconds for one of three prompts to be received from the host and transmits a different string (plus carriage return) depending upon which prompt is received.

Sub WhichPromptDemo()
Dim myArray(1 To 3) As String
myArray(1) = "Prompt 1:"
myArray(2) = "Prompt 2:"
myArray(3) = "Prompt 3:"
Select Case Application.WaitForStrings(myArray, "20", rcAllowKeystrokes)
Case 1:
Session.Transmit "Text1" & Chr$(rcCR)
Case 2:
Session.Transmit "Text2" & Chr$(rcCR)
Case 3:
Session.Transmit "Text3" & Chr$(rcCR)
Case Else
MsgBox "Timed out with no recognized prompt."
End Select
End Sub