Hack Forums

Full Version: A batch guestion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a command that make the program to pause 10 seconds
not: pause
what program? you mean your batch file?

yes.

Code:
ping localhost -n 10 >nul
ping localhost -n number. or something like that

Edit: DANG!! too slow.. by a few seconds...
Yes remember this : 1400=1 second

set wait=
:pause
set /a wait=%wait%+1
if %wait% leq 14000 goto :pause
Unclean Spirit Wrote:Yes remember this : 1400=1 second

set wait=
:pause
set /a wait=%wait%+1
if %wait% leq 14000 goto :pause

that wouldnt work...

set wait=1
:pause
set /a wait=%wait% +1
if %wait%==14000 goto next
goto pause
:next

should be like that i think..

still credits for solution to you..
zippo's one is better since you can run commands while waiting.
edit: uncleans one
ty for the answers
personally I think mine is better than both. This is because you can just slip that bad boy in there and be all happy about it :D

ok, so i made a few edits to compile this with another batch:

Code:
@echo off
title The Wait Program
Echo.
Echo The Wait Program
echo.
echo.
:pause
cls
set /p wait=Please Select How Long You Want To Wait:  
ping localhost -n %wait% >nul
echo ISN'T THIS COOL!!!
ECHO THIS IS AWESOME!!!
echo.
echo.
echo Wow! that was %wait% second(s)!!! Press any key to continue...
pause>nul
:again
cls
set /p exit=Exit? (y / n):  
if %exit%==y exit
if %exit%==n goto :pause
echo Sorry, that is not an answer, please select y or n...
pause>nul
goto :again
the last echo will not be displayed well it will be displayed for 0.00003 seconds
Psinetic Wrote:personally I think mine is better than both. This is because you can just slip that bad boy in there and be all happy about it :D

ok, so i made a few edits to compile this with another batch:

Code:
@echo off
title The Wait Program
Echo.
Echo The Wait Program
echo.
echo.
:pause
cls
set /p wait=Please Select How Long You Want To Wait:  
ping localhost -n %wait% >nul
echo ISN'T THIS COOL!!!
ECHO THIS IS AWESOME!!!
echo.
echo.
echo Wow! that was %wait% second(s)!!! Press any key to continue...
pause>nul
:again
cls
set /p exit=Exit? (y / n):  
if %exit%==y exit
if %exit%==n goto :pause
echo Sorry, that is not an answer, please select y or n...
goto :again

hehe, very usefull program, you should take money for it Roflmao

anyway.. learned from reading it =P nice
Pages: 1 2
Reference URL's