Page 1 of 1

set /p timeout

Posted: 20 May 2010 00:30
by dani8190
i cant remember how to make a set /P text=text: with timeout.

:home
set /P some text=some text

if you not have typed somthing and pressed enter for a time it will go back to home. how to do that?

(hope you understand)

Re: set /p timeout

Posted: 20 May 2010 11:35
by aGerman
SET /P stops your batch file and waits for input. There is no timeout.

Regards
aGerman

Re: set /p timeout

Posted: 20 May 2010 11:54
by 1+2=46
Batch is very limited. You can do it with vbs, but I suggest you learning VB.

Re: set /p timeout

Posted: 20 May 2010 12:07
by jeb
The only way with pure batch seems to be the use of two cmd-windows.

You can start a second cmd window and start the set /p input in the second window, so the first one can build it's own "timeout".

jeb