Hi,
Scripting.WaitFor
and Scripting.ReadUntil
methods are both for the same purpose, they both receive data from the server, but they differ in their return values. Scripting.WaitFor
is intended for uses where you want to check what was the reason of returning from the method, e.q. if the prompt was matched (if it was in ScriptEvent
input parametes), or if the match was success in general and so on.
Scripting.ReadUntil
returns the data it receives.
You can get both ScriptMatch
and received data from Scripting.LastResult
and Scripting.ReceivedData
, if you need all information you can get. It doesn't matter which method you call, they are for your convenience.
On the other hand, Scripting.CheckFor
does not receive any data and check the state in which the terminal is currently in. So you can read until some string and then check if it appears on the right position. Or wait until prompt is received and then check if the line above the current line have the prompt as well.
Scripting.DetectPrompt()
is not working for you?