I'm a new user.. I wrote a bat.. I limited the input to be only between 1-8. If the input is empty or greater than or equal to 9 or something else, it all displays to re-enter..
But how should I limit the number of wrong inputs.. For example, when the continuous wrong input count = 5, force exit.. How to implement..
@echo off
title Easy Go! %username% - %date% - %time%!
color 7F
mode con cols=70 lines=15
echo Read carefully for the first time
echo 1.If you need help please input 7!
echo 2.If you have some good suggestions
echo can send mails to "shmilyfriend@sina.com" or shmilyfriend@126.com
echo Please input the number
:shuru
set /p i=i:
if "%i%"=="" goto shuru
if %i% GEQ 9 goto tishi
if "%i%"=="1" GOTO labsys
if "%i%"=="2" GOTO change_window
if "%i%"=="3" GOTO Infor_window
if "%i%"=="4" GOTO QQ
if "%i%"=="5" GOTO color ball
if "%i%"=="6" GOTO sina
if "%i%"=="7" GOTO help
if "%i%"=="8" GOTO 88
:tishi
echo wrong number! pls input again
GOTO shuru
:record
echo %date% -%time% -%username% use %i% >>d:\test1.txt
exit
:color ball
start "" "D:\03.exe"
goto record
exit
:QQ
start "" "D:\program files\tencent\qq\bin\qq.exe"
goto record
exit
:help
echo 1 :labsys
echo 2:修改窗口
echo 3:提示窗口
echo 4:QQ
echo 5:彩球
echo 6:Sina
echo 7:離開
echo 8:幫助。。。
goto shuru
:88
msg %username% best wishes and see you next time。。。
goto record
exit
:labsys
start "" "D:\桌面資料\tool\169-0327.exe"
goto record
exit
:change_window
start "" "D:\桌面資料\tool\修改窗口0324.exe"
goto record
exit
:Infor_window
start "" "D:\桌面資料\tool\提示窗口.exe"
goto record
exit
:sina
start "" "D:\Program Files\TheWorld 2.0\TheWorld.exe" "http://mail.sina.com.cn/"
goto record
exit
But how should I limit the number of wrong inputs.. For example, when the continuous wrong input count = 5, force exit.. How to implement..
@echo off
title Easy Go! %username% - %date% - %time%!
color 7F
mode con cols=70 lines=15
echo Read carefully for the first time
echo 1.If you need help please input 7!
echo 2.If you have some good suggestions
echo can send mails to "shmilyfriend@sina.com" or shmilyfriend@126.com
echo Please input the number
:shuru
set /p i=i:
if "%i%"=="" goto shuru
if %i% GEQ 9 goto tishi
if "%i%"=="1" GOTO labsys
if "%i%"=="2" GOTO change_window
if "%i%"=="3" GOTO Infor_window
if "%i%"=="4" GOTO QQ
if "%i%"=="5" GOTO color ball
if "%i%"=="6" GOTO sina
if "%i%"=="7" GOTO help
if "%i%"=="8" GOTO 88
:tishi
echo wrong number! pls input again
GOTO shuru
:record
echo %date% -%time% -%username% use %i% >>d:\test1.txt
exit
:color ball
start "" "D:\03.exe"
goto record
exit
start "" "D:\program files\tencent\qq\bin\qq.exe"
goto record
exit
:help
echo 1 :labsys
echo 2:修改窗口
echo 3:提示窗口
echo 4:QQ
echo 5:彩球
echo 6:Sina
echo 7:離開
echo 8:幫助。。。
goto shuru
:88
msg %username% best wishes and see you next time。。。
goto record
exit
:labsys
start "" "D:\桌面資料\tool\169-0327.exe"
goto record
exit
:change_window
start "" "D:\桌面資料\tool\修改窗口0324.exe"
goto record
exit
:Infor_window
start "" "D:\桌面資料\tool\提示窗口.exe"
goto record
exit
:sina
start "" "D:\Program Files\TheWorld 2.0\TheWorld.exe" "http://mail.sina.com.cn/"
goto record
exit
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| DOSroot | -2 | 2010-07-10 21:03 |
