Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
BOSSthomas
- Posts: 1
- Joined: 30 Sep 2016 13:44
#1
Post
by BOSSthomas » 30 Sep 2016 13:49
So hier meine Frage.
Wie ihr unten seht will ich das mann als erstes seinen Benutzernamen eingeben muss.
Aber ich will das man wenn mann nichts eingibt automatisch weitergeleitet wird.
Mit dem Choice geht das nciht weil man da nur 1 zahl als 1 Errorlevel setzten kann.
Wie kann ich mit set /p, einen Automatischen timer einstellen wenn ich nichts eingebe das der dann weiter do :Lieben geht..
Wäre dankbar für jede Antwort.
Code: Select all
@echo off
color 0a
goto sd
:Start
CHOICE /t 3 /c:12 /D:2 /n /m "Passwort:"
IF %ERRORLEVEL% == 1 goto lll
goto Lieben
:sd
cls
echo Benutzername:(Random fuer Jetzt Spielen)
set /p input=
if %input%==Thomas goto :Start
goto :Lieben
:Lieben
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Lade... XX Sekunden
echo ---------------------------------------
echo = 0 ]
echo ---------------------------------------
ping localhost -n 2 >nul
-
Aacini
- Expert
- Posts: 1914
- Joined: 06 Dec 2011 22:15
- Location: México City, México
-
Contact:
#2
Post
by Aacini » 30 Sep 2016 14:17
Desgraciadamente, yo no entiendo nada de Alemán.
Antonio
-
foxidrive
- Expert
- Posts: 6031
- Joined: 10 Feb 2012 02:20
#3
Post
by foxidrive » 30 Sep 2016 16:09
https://translate.google.com/Mit Google übersetzen
So here is my question.
As you can see below I want the man to enter first his username.
But I want to be when man enters not automatically redirected.
By Choice goes nciht because you can because only 1 number 1 as ErrorLevel translated.
How to set / p, set an automatic timer when I type anything, the which then do: Love is ..
Would be grateful for each answer.
-
aGerman
- Expert
- Posts: 4678
- Joined: 22 Jan 2010 18:01
- Location: Germany
#4
Post
by aGerman » 30 Sep 2016 16:49
Basically the question is how to write an input algorithm for a string that behaves like SET /P but with a time out like CHOICE. If the time-out interval elapsed the script shall be directed to a label.
@BOSSthomas
As you can see users from all over the world join this forum. In order to have a common understanding the prefered language is English at DosTips.
Steffen
-
Aacini
- Expert
- Posts: 1914
- Joined: 06 Dec 2011 22:15
- Location: México City, México
-
Contact:
#5
Post
by Aacini » 30 Sep 2016 17:46
aGerman wrote:Basically the question is how to write an input algorithm for a string that behaves like SET /P but with a time out like CHOICE. If the time-out interval elapsed the script shall be directed to a label.
In such a case, there are a couple solutions at
this SO question.
Antonio