Welcome to part 3 of my blab! The political, random, and basically the anything that can exist Blab!
But like every blab I will make: Daily video!
Anyway unto our blab!
Have you ever wanted a stop watch, where you didn’t have to use online [Connected to the internet] Or just buy one at a store?
Good news! I actually have a batch code that some people already know!
The code is the following:
@echo off
set title=Stop Watch 1000 V1.7
title %title%
color 0a
:start
cls
echo Press any key to start the timer or H to see the instructions
set /p start=
if %start% equ H goto help
if %start% equ h goto help
goto back
:help
cls
echo Press 1 to start/stop the timer
echo Press 2 to record a lap (maximum of three laps)
echo Press 3, when stopped, to reset the timer.
echo.
echo The timer only counts in whole seconds.
echo.
echo Press any key to go back
pause >nul
goto start
:back
set lap1=0
set lap2=0
set lap3=0
set time=-1
set reset=0
set timex=0
set timey=1
set err=0
set errx=0
set erry=0
set lap=0
:timer
title %title%
If %timex% neq 0 set /a timex=%timex%+1
If %errx% neq 0 set /a errx=%errx%+1
If %timex% geq %timey% set reset=0
if %errx% geq %erry% set err=0
If %lap3% neq 0 set lap=1
if %lap3% equ 0 set lapnum=3
If %lap2% equ 0 set lapnum=2
If %lap1% equ 0 set lapnum=1
set /a time=%time%+1
cls
If %err% neq 0 echo All three laps have values already. You cannot add any more
If %err% neq 0 echo.
If %reset% EQU 1 echo Cannot reset because time has not been stopped
echo %time% seconds
echo.
echo.
If %lap1% neq 0 echo Lap One: %lap1% seconds
If %lap2% neq 0 echo Lap Two: %lap2% seconds
If %lap3% neq 0 echo Lap Three: %lap3% seconds
echo.
echo.
echo 1 = Start/Stop
echo 2 = Lap
echo 3 = Reset (once stopped)
echo.
choice /c 123c /n /t 1 /d c
if %ERRORLEVEL% equ 1 goto stop
if %ERRORLEVEL% equ 2 goto lap
if %ERRORLEVEL% equ 3 set timex=%time%
if %ERRORLEVEL% equ 3 set /a timey=%timex%+3
if %ERRORLEVEL% equ 3 set reset=1
if %ERRORLEVEL% equ 3 goto timer
If %ERRORLEVEL% equ 4 goto timer
:stop
title %title% ~ Stopped
cls
echo %time% seconds
echo.
echo.
If %lap1% neq 0 echo Lap One: %lap1% seconds
If %lap2% neq 0 echo Lap Two: %lap2% seconds
If %lap3% neq 0 echo Lap Three: %lap3% seconds
echo.
echo.
echo 1 = Start/Stop
echo 2 = Lap
echo 3 = Reset (once stopped)
echo.
choice /c 123 /n
If %ERRORLEVEL% equ 1 goto timer
If %ERRORLEVEL% EQU 2 set lap%lapnum%=%time%
If %ERRORLEVEL% equ 3 goto reset
:lap
if %lap% equ 1 set errx=0
if %lap% equ 1 set erry=3
if %lap% equ 1 set err=1
if %lap% equ 1 goto timer
cls
set lap%lapnum%=%time%
set time=-1
goto timer
:reset
cls
set lap1=0
set lap2=0
set lap3=0
set time=0
set reset=0
set timex=0
set timey=1
set err=0
set errx=0
set erry=1
set lap=0
goto stop
Here are the steps in order:
- Copy and paste the code shown above into notepad [or a word processing document]
- Do save as and save it as the following: InsertName.bat
- Then simply open it up and your good to go!
And that is it! You have a stopwatch!
Final Notes:
I cant give exact credit to this, because almost every person on the web has done and/or used this!
I will of course, say that whoever did make it, sure did put in a lot of effort!
Anyway that’s all I will say today, until then, I’ll be signing off!
