0

In a batch file I am making, I need to ask for user input without having it stop. I know about set /p and choice /c, but these options pause the batch file and disallow simultaneous processing.

<nul set /p doesn't work either, as it is almost instantaneous and barely allows key presses. I also don't want to have to press the ENTER key.

Please help me.

Matthew Horvath
  • 186
  • 1
  • 12
  • 2
    [here](http://stackoverflow.com/a/20589442/2152082) is an example, how to do this. – Stephan Apr 18 '16 at 20:16
  • @Stephan, but the script at the (interesting) answer you referenced does halt for user input (at least as far as I understood it), but the OP asked for not pausing at all; I am really curious if there is a way in pure batch scripting... – aschipfl Apr 19 '16 at 00:10
  • Are you looking for some kind of _asynchronous_ user's input? – JosefZ Apr 19 '16 at 07:46
  • @JosefZ No, just something that'll take input at any time (after the command is executed). – Matthew Horvath Apr 19 '16 at 16:29
  • 1
    What would be this input for? Will you use it as a parameter for the current running script? I was thinking in some sort of solution along questions [#1](http://stackoverflow.com/questions/1449188/running-windows-batch-file-commands-asynchronously) [#2](http://stackoverflow.com/questions/18758502/wait-for-multiple-applications-run-asynchronously-from-batch-file-to-finish) [#3](http://stackoverflow.com/questions/14534244/execute-a-command-asynchronously-while-redirecting-the-output-to-a-file-in-a-bat). Where your main batch would wait for the user input while the secondary one runs your command – Daniel Luz Apr 19 '16 at 21:31
  • @DanielLuz Thanks! dbenham is the creator of batch Snake, so I know if he answered the questions you cited, it's going to work! – Matthew Horvath Apr 19 '16 at 21:56

0 Answers0