Process.Expect (gb.util)
Sub Expect ( Prompt As String [ , Answer As String, Keep As Boolean ] )
自从 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.
自从 3.17
-
Keep tells if the prompt keeps being watched after having been detected, or if it is disabled. Keep is FALSE by default.
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.