What does xsh.Screen.Synchronous do?
PROBLEM DESCRIPTION or QUESTION
What does xsh.Screen.Synchronous do exactly? How can I incorporate this into my script?
RESOLUTION
Synchronization means that the output of the terminal synchronizes with some external output such as message boxes.
For example, let's suppose that the following messages are printed in the terminal.
$ cat test.txt
Netsarang => the first match
blah blah
blah blah
blah blah
Computer => the second match
A sample VB script:
Sub Main
xsh.Screen.Synchronous = true
xsh.Screen.WaitForString("Netsarang")
xsh.Dialog.MsgBox("1st match")
xsh.Screen.WaitForString("Computer")
xsh.Dialog.MsgBox("2nd match")
End Sub
If the value is set to true, the terminal output stops when the first match message box appears. So the script can then find the second match.
However, if the value is set to false, even though the first match dialog box appears, the rest of the messages are printed in the terminal. So after closing the first message box, the second match box would not pop up.