Re: How to control the loop within expect.



Maybe something like this:

for {set i 1} {i<10} {incr i} {
set executeCommandB 1
send a commanda
expect {
1 {puts 1}
2 {puts 2}
3 {........; set executeCommandB 0}
}
if {$executeCommandB}
send a commandb
}
}

.