0

I have a script that is made up of many steps. I want it to run from start to end most of the time.

Sometimes, I want to skip one of the steps. I'm looking for a "continue by default unless user presses a key" solution, like how Windows boots normally UNLESS you hit any key:

enter image description here

One way I thought of doing this would be by having a menu prompt the user each time to run the full script or just part of it, but this prevents the script from going any further until the user makes a choice. Any suggestions?

KERR
  • 415
  • 5
  • 9
  • So you want to give the user, say, 10 seconds to skip, otherwise it will continue? – Smock Nov 19 '19 at 11:26
  • @Smock yes, or even better, let the user skip the current task in progress (may not be possible). Thanks! – KERR Nov 19 '19 at 11:28
  • Have a look at [this question and answer on Stack Overflow](https://stackoverflow.com/questions/150161/waiting-for-user-input-with-a-timeout) - see if that does the trick. – Smock Nov 19 '19 at 11:46

0 Answers0