comp • gb.util • process • expect

Process.Expect (gb.util)

Sub Expect ( Prompt As String [ , Answer As String ] )

Since 3.15

Tell which answer must be sent when a specific prompt is emitted by the process on its standard input.

  • Prompt : The prompt as a LIKE regular expression that should match the last characters emitted by the process.

  • Answer : The optional answer string to send back.

The Prompt event is emitted just after the answer has been sent, or just after the prompt has been detected if no answer was specified.