Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
milost
- Posts: 2
- Joined: 07 Oct 2010 09:35
#1
Post
by milost » 07 Oct 2010 12:04
Well, how can I do, that my programm will be waiting only 6 secound to introduce something?
For example:
Code: Select all
[...]
:08
echo Poland
set /p a="enter capital: " (and it may last only 6 seconds; if longer goto :10)
if %a%==Warsaw color 2
echo Warsaw
goto :00
[...]
:10
echo too long
Can you help me?
-
aGerman
- Expert
- Posts: 4678
- Joined: 22 Jan 2010 18:01
- Location: Germany
#2
Post
by aGerman » 08 Oct 2010 14:42
Sorry, but there is no timeout for 'set /p'. Once I thought about a temporary VBScript that you could call using 'cscript //nologo //t:10 xyz.vbs', but this doesn't work while the script is waiting for input.
That means I didn't found a solution. Probably you have to use a different language or maybe a third party tool.
Regards
aGerman
-
milost
- Posts: 2
- Joined: 07 Oct 2010 09:35
#3
Post
by milost » 09 Oct 2010 04:08
I thought so
Thank you very much