December 1994
Intermediate to advanced
606 pages
16h 7m
English
Like the expect command, it is possible to have the interact command cause its caller to break or continue. Each of these can be used as an action. For example, in the following loop, if a user presses "+“, interact returns and the while loop breaks.
while {1} {
interact "+" break
}The continue command works similarly. In the following loop, if a user presses "+“, the interact returns and the loop breaks. If the "-" is pressed, the interact returns, and the while loop continues.
while {1} {
interact "+" break "-" continue
}