0

I'm newbie with Expect and need a simple functionality: wait for a user to press ANY key and then continue the flow. What command in the script should I use for this purpose ?

Thanks.

Mark
  • 6,052
  • 8
  • 61
  • 129

2 Answers2

2

This entry on the tcl wiki should answer your question, but it does not use expect.

Bradley Swain
  • 804
  • 5
  • 12
  • +1 for referring to something I wrote long ago! Note that it still requires that the key produce a character. I note this because I remember seeing a user who used the shift key as the “any key”, and then wondered why nothing was happening. After that, I rewrote my code to ask for the space bar to be pressed. :-) – Donal Fellows Jun 09 '11 at 23:43
  • @donal I'm just getting into Tcl for an application scripting language for a project at work, and I've been seeing your name around a lot. Thanks for all your contributions. :) – Bradley Swain Jun 10 '11 at 16:10
1

Could you please try this out:

expect "*\r"
expect_continue
eeerahul
  • 1,629
  • 4
  • 27
  • 38