Help...help...help
Moderator: DosItHelp
Help...help...help
Hi....
I have a batch file which start uTorrent with the warning remaining about connecting external drive with the utorrents files.
This is to remind and prevent the start of application, because if I start utorrent without external hard drive the utorrent application can't find the correct directory and all file are reported as falls. When finally drive is connected it is required to make recheck which take a long time to finalize. Before finish that task it is impossible to use application in any form.
This is the batch:
****************************************************************
@echo off
@echo off
color C
echo ------------------------------------------------
echo Did you connect external DRIVE for uTorrents ???
echo ------------------------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 1
if %bang%==2 goto 3
echo -----
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 4
if %bang%==2 goto 5
:3
CLS
echo.
echo.
echo.
echo -----------------------------------------------------
echo Please connect external DRIVE with uTorrent files
echo -----------------------------------------------------
pause
CLS
color E
echo --------------
echo and try again
echo --------------
pause
CLS
Exit
:4
Start C:\>c:\BatchuTorrentLink
Start c:\BatchuTorrentLink\uTorrent.exe
:5
CLS
Exit
*******************************************************
Everything it seems to work correctly expect one little hiccup at the end of section with this options:
******************
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 4
if %bang%==2 goto 5
***************************
option with key 1 and 2 works correctly but I have notice that if I choose just any other key on keyboard and "ENTRY", still it make selection to run the final and requested .exe file
I was trying to find solution to prevent that but unfortunately without success.
Now at the end I have just notice that similar situation specially with pressing "any key on keyboard" apply as well to section at beginning.
It is not a very important, but it bothers me to find out how it can be done covering practically every situation.
Thanks for help,
Kalop
I have a batch file which start uTorrent with the warning remaining about connecting external drive with the utorrents files.
This is to remind and prevent the start of application, because if I start utorrent without external hard drive the utorrent application can't find the correct directory and all file are reported as falls. When finally drive is connected it is required to make recheck which take a long time to finalize. Before finish that task it is impossible to use application in any form.
This is the batch:
****************************************************************
@echo off
@echo off
color C
echo ------------------------------------------------
echo Did you connect external DRIVE for uTorrents ???
echo ------------------------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 1
if %bang%==2 goto 3
echo -----
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 4
if %bang%==2 goto 5
:3
CLS
echo.
echo.
echo.
echo -----------------------------------------------------
echo Please connect external DRIVE with uTorrent files
echo -----------------------------------------------------
pause
CLS
color E
echo --------------
echo and try again
echo --------------
pause
CLS
Exit
:4
Start C:\>c:\BatchuTorrentLink
Start c:\BatchuTorrentLink\uTorrent.exe
:5
CLS
Exit
*******************************************************
Everything it seems to work correctly expect one little hiccup at the end of section with this options:
******************
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 4
if %bang%==2 goto 5
***************************
option with key 1 and 2 works correctly but I have notice that if I choose just any other key on keyboard and "ENTRY", still it make selection to run the final and requested .exe file
I was trying to find solution to prevent that but unfortunately without success.
Now at the end I have just notice that similar situation specially with pressing "any key on keyboard" apply as well to section at beginning.
It is not a very important, but it bothers me to find out how it can be done covering practically every situation.
Thanks for help,
Kalop
Re: Help...help...help
You have two different key results (1 and 2). But there are possible three different results (1, 2 and any other key).
Code: Select all
@echo off
:here1
echo ##
echo 1 - Option 1
echo 2 - Option 2
echo.
set /pbang=Select and press ENTER:
if %bang%==1 goto :opt1
if %bang%==2 goto :opt2
goto here1
:opt1
echo.
echo Option ONE is selected.
echo.
goto :eof
:opt2
echo.
echo Option TWO is selected.
echo.
Re: Help...help...help
Thanks trebor68 for quick replay.
I apologies for trouble, but were precisely I should add your lines o make it works?
I apologies for trouble, but were precisely I should add your lines o make it works?
Re: Help...help...help
Hi Kalop,
You need to filter their choices or you might want to use choice commands. I've modified your code a bit. Please try:
****************************************************************
-renzlo
You need to filter their choices or you might want to use choice commands. I've modified your code a bit. Please try:
****************************************************************
Code: Select all
@echo off
@echo off
color C
echo ------------------------------------------------
echo Did you connect external DRIVE for uTorrents ???
echo ------------------------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu1
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu1
if %bang%==1 goto 1
if %bang%==2 goto 3
echo -----
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if %bang%==1 goto 4
if %bang%==2 goto 5
:3
CLS
echo.
echo.
echo.
echo -----------------------------------------------------
echo Please connect external DRIVE with uTorrent files
echo -----------------------------------------------------
pause
CLS
color E
echo --------------
echo and try again
echo --------------
pause
CLS
Exit
:4
Start C:\>c:\BatchuTorrentLink
Start c:\BatchuTorrentLink\uTorrent.exe
:5
CLS
Exit
-renzlo
Re: Help...help...help
thanks -renzlo
There is nearly 100% improvement, but still when I choose option 1 for
"echo Did you connect external DRIVE for uTorrents ???"
and get to second menu wit
"echo Do you want to start uTorrent ???"
it can still open .exe file after I press "ENTER" key without making any chooses
There is nearly 100% improvement, but still when I choose option 1 for
"echo Did you connect external DRIVE for uTorrents ???"
and get to second menu wit
"echo Do you want to start uTorrent ???"
it can still open .exe file after I press "ENTER" key without making any chooses
Re: Help...help...help
if that's the case, try this:
-renzlo
Code: Select all
@echo off
color C
echo ------------------------------------------------
echo Did you connect external DRIVE for uTorrents ???
echo ------------------------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu1
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu1
if not defined bang goto menu1
if %bang%==1 goto 1
if %bang%==2 goto 3
echo -----
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if not defined bang goto menu2
if %bang%==1 goto 4
if %bang%==2 goto 5
:3
CLS
echo.
echo.
echo.
echo -----------------------------------------------------
echo Please connect external DRIVE with uTorrent files
echo -----------------------------------------------------
pause
CLS
color E
echo --------------
echo and try again
echo --------------
pause
CLS
Exit
:4
Start C:\>c:\BatchuTorrentLink
Start c:\BatchuTorrentLink\uTorrent.exe
:5
CLS
Exit
-renzlo
Re: Help...help...help
sorry, no change. Still "entry" before any options opens file
Re: Help...help...help
yes, problem is that when key "Enter: is press is producing opening .exe file.
The must be something what can stop that after pressing Enter, and send it into the loop with menu2
The must be something what can stop that after pressing Enter, and send it into the loop with menu2
Re: Help...help...help
Simple
I just add one line between:
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if not defined bang goto menu2
goto 5
if %bang%==1 goto 4
if %bang%==2 goto 5
I just add one line between:
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if not defined bang goto menu2
goto 5
if %bang%==1 goto 4
if %bang%==2 goto 5
Re: Help...help...help
How about this:
Code: Select all
@echo off
color C
echo ------------------------------------------------
echo Did you connect external DRIVE for uTorrents ???
echo ------------------------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu1
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu1
if not defined bang goto menu1
if %bang%==1 goto 1
if %bang%==2 goto 3
echo -----
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
goto :eof
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if not defined bang goto menu2
if %bang%==1 goto 4
if %bang%==2 goto 5
:3
CLS
echo.
echo.
echo.
echo -----------------------------------------------------
echo Please connect external DRIVE with uTorrent files
echo -----------------------------------------------------
pause
CLS
color E
echo --------------
echo and try again
echo --------------
pause
CLS
goto :eof
:4
Start C:\>c:\BatchuTorrentLink
Start c:\BatchuTorrentLink\uTorrent.exe
goto :eof
:5
CLS
goto :eof
Re: Help...help...help
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
goto :eof
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if not defined bang goto menu2
if %bang%==1 goto 4
if %bang%==2 goto 5
in that section wit that dosen't let ypu to make chosse with option 1 and 2
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
goto :eof
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if not defined bang goto menu2
if %bang%==1 goto 4
if %bang%==2 goto 5
in that section wit that dosen't let ypu to make chosse with option 1 and 2
Re: Help...help...help
replace that section with this:
Code: Select all
:1
@echo off
CLS
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
:menu2
set /p bang= Please select and press ENTER - Option:
echo("%bang%"|findstr /vrxc:"\"[1-2]\"" >nul &&goto menu2
if not defined bang goto menu2
if %bang%==1 goto 4
if %bang%==2 goto 5
Re: Help...help...help
no...it dosen't work
it is very interesting because if you press "Enter" in the first instants .exe.file will start. (what shouldn't happened)
However if you first take Option 1 or 2 the process is working according to plan.
But if you just say by mistake first time in Option insert other key on keyboard expect 1 or 2 and hit "Enter" it will take you to the beginning of the process.
The difference only now is that if you press "Entry" the hole process is working as intended, that is shoutdown.
Now the question is how to in the first instant stop "Entry" preforming opening ,exe file.
it is very interesting because if you press "Enter" in the first instants .exe.file will start. (what shouldn't happened)
However if you first take Option 1 or 2 the process is working according to plan.
But if you just say by mistake first time in Option insert other key on keyboard expect 1 or 2 and hit "Enter" it will take you to the beginning of the process.
The difference only now is that if you press "Entry" the hole process is working as intended, that is shoutdown.
Now the question is how to in the first instant stop "Entry" preforming opening ,exe file.
Re: Help...help...help
Here your batch file with the new rows
I have only add the new lines.:
###########################
@echo off
:menu0
color C
echo ------------------------------------------------
echo Did you connect external DRIVE for uTorrents ???
echo ------------------------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set bang=0
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 1
if %bang%==2 goto 3
goto :menu0
echo -----
:1
@echo off
CLS
:menu1
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set bang=0
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 4
if %bang%==2 goto 5
goto :menu1
:3
CLS
echo.
echo.
echo.
echo -----------------------------------------------------
echo Please connect external DRIVE with uTorrent files
echo -----------------------------------------------------
pause
CLS
color E
echo --------------
echo and try again
echo --------------
pause
CLS
Exit
:4
Start C:\>c:\BatchuTorrentLink
Start c:\BatchuTorrentLink\uTorrent.exe
:5
CLS
Exit
###########################
I have only add the new lines.:
###########################
@echo off
:menu0
color C
echo ------------------------------------------------
echo Did you connect external DRIVE for uTorrents ???
echo ------------------------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set bang=0
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 1
if %bang%==2 goto 3
goto :menu0
echo -----
:1
@echo off
CLS
:menu1
color A
echo.
echo.
echo.
echo ---------------------------------
echo Do you want to start uTorrent ???
echo ---------------------------------
echo.
echo MENU
echo ---------
echo 1= Yes
echo 2= No
echo.
set bang=0
set /pbang= Please select and press ENTER - Option:
if %bang%==1 goto 4
if %bang%==2 goto 5
goto :menu1
:3
CLS
echo.
echo.
echo.
echo -----------------------------------------------------
echo Please connect external DRIVE with uTorrent files
echo -----------------------------------------------------
pause
CLS
color E
echo --------------
echo and try again
echo --------------
pause
CLS
Exit
:4
Start C:\>c:\BatchuTorrentLink
Start c:\BatchuTorrentLink\uTorrent.exe
:5
CLS
Exit
###########################