qmqmqm
April 30th, 2009, 09:07 PM
Hi
I have searched around on http://wiki.tcl.tk and other places online, but I did not seem to have found the answer...
My questions is: does Expect script know to skip a line if it does not see anything that matches it, but sees something that matches the next line?
For example:
Suppose I have the following Expect script:
expect "Hi1" {send_user "received 1"}
expect "Hi2" {send_user "received 2"}
If the input received is "Hi2" without having "Hi1" before it, does the script know to skip the first line of code?
If not, is there a way to make the script smart enought to do this?
Thanks a lot.
Tom
I have searched around on http://wiki.tcl.tk and other places online, but I did not seem to have found the answer...
My questions is: does Expect script know to skip a line if it does not see anything that matches it, but sees something that matches the next line?
For example:
Suppose I have the following Expect script:
expect "Hi1" {send_user "received 1"}
expect "Hi2" {send_user "received 2"}
If the input received is "Hi2" without having "Hi1" before it, does the script know to skip the first line of code?
If not, is there a way to make the script smart enought to do this?
Thanks a lot.
Tom