I have something like this.
expect
"hi" { send "You said hi\n" }
"hello" { send "Hello yourself\n" }
"hi" { send "2nd time you said hi\n" }
The scenario is I will get a initial response 'hi', then 'hello', then 'hi' again. The second time I get a response of 'hi', I want to send a different string.
Thanks.