Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO off
- MODE CON:COLS=46 LINES=9
- echo --------------------------------- >> C:UsersusernameDesktopProgress.txt
- echo. >> C:UsersusernameDesktopProgress.txt
- echo %date% >> C:UsersusernameDesktopProgress.txt
- set counter=0
- set TST=0
- :1
- @echo off
- setlocal
- rem The format of %TIME% is HH:MM:SS,CS for example 23:59:59,99
- set STARTTIME=%TIME%
- @echo off
- set /a counter=counter+1
- set /a TST=TST+%duration%
- rem now break the centiseconds down to hors, minutes, seconds and the remaining centiseconds
- set /A TSTH=%TST% / 360000
- set /A TSTM=(%TST% - %TSTH%*360000) / 6000
- set /A TSTS=(%TST% - %TSTH%*360000 - %TSTM%*6000) / 100
- set /A TSTHS=(%TST% - %TSTH%*360000 - %TSTM%*6000 - %TSTS%*100)
- rem some formatting
- if %TSTH% LSS 10 set TSTH=0%TSTH%
- if %TSTM% LSS 10 set TSTM=0%TSTM%
- if %TSTS% LSS 10 set TSTS=0%TSTS%
- if %TSTHS% LSS 10 set TSTHS=0%TSTHS%
- echo. >> C:UsersusernameDesktopProgress.txt
- echo Total Time: %TSTH%:%TSTM%:%TSTS% Plus >> C:UsersusernameDesktopProgress.txt
- echo Started on: %time% >> C:UsersusernameDesktopProgress.txt
- color f0
- cls
- :hour
- set hour=1
- :min
- set min=0
- :second
- set second=0
- :countit
- cls
- echo Main Event
- echo %date%
- echo.
- echo %min% Minutes
- echo %sec% Seconds
- echo Hours # %counter%
- echo Total Time: %TSTH%:%TSTM%:%TSTS%
- set /a sec="%sec%-1"
- if %sec%==-1 set /a min="%min%-1"
- if %sec%==-1 set /a sec="59"
- if %min%==-1 set /a hour="%hour%-1"
- if %min%==-1 set /a min="59"
- if %hour%==-1 goto 2
- ping -n 2 127.0.0.1 >NUL
- goto countit
- :2
- start "" "C:UsersusernameDesktopTimer file1.mp3"
- echo.
- pause>nul
- echo Are You Sure?
- pause>nul
- cls
- echo Okay then, Ready..
- Pause>nul
- @echo off
- echo stopped on: %time% >> C:UsersusernameDesktopProgress.txt
- set ENDTIME=%TIME%
- rem output as time
- echo STARTTIME: %STARTTIME%
- echo ENDTIME: %ENDTIME%
- rem convert STARTTIME and ENDTIME to centiseconds
- set /A STARTTIME=(1%STARTTIME:~0,2%-100)*360000 + (1%STARTTIME:~3,2%-100)*6000 + (1%STARTTIME:~6,2%-100)*100 + (1%STARTTIME:~9,2%-100)
- set /A ENDTIME=(1%ENDTIME:~0,2%-100)*360000 + (1%ENDTIME:~3,2%-100)*6000 + (1%ENDTIME:~6,2%-100)*100 + (1%ENDTIME:~9,2%-100)
- rem calculating the duratyion is easy
- set /A DURATION=%ENDTIME%-%STARTTIME%
- rem now break the centiseconds down to hors, minutes, seconds and the remaining centiseconds
- set /A DURATIONH=%DURATION% / 360000
- set /A DURATIONM=(%DURATION% - %DURATIONH%*360000) / 6000
- set /A DURATIONS=(%DURATION% - %DURATIONH%*360000 - %DURATIONM%*6000) / 100
- set /A DURATIONHS=(%DURATION% - %DURATIONH%*360000 - %DURATIONM%*6000 - %DURATIONS%*100)
- rem some formatting
- if %DURATIONH% LSS 10 set DURATIONH=0%DURATIONH%
- if %DURATIONM% LSS 10 set DURATIONM=0%DURATIONM%
- if %DURATIONS% LSS 10 set DURATIONS=0%DURATIONS%
- if %DURATIONHS% LSS 10 set DURATIONHS=0%DURATIONHS%
- rem outputing
- echo Duration is %DURATIONH%:%DURATIONM%:%DURATIONS% >> C:UsersusernameDesktopProgress.txt
- cls
- :4
- color e0
- cls
- :hour
- set hour=0
- :min
- set min=10
- :sec
- set sec=0
- :continue
- cls
- echo Break...
- echo %date%
- echo.
- echo %min% Minutes
- echo %sec% Seconds
- echo Hours # %counter%
- echo Total Time: %TSTH%:%TSTM%:%TSTS%
- set /a sec="%sec%-1"
- if %sec%==-1 set /a min="%min%-1"
- if %sec%==-1 set /a sec="59"
- if %min%==-1 set /a hour="%hour%-1"
- if %min%==-1 set /a min="59"
- if %hour%==-1 goto 3
- ping -n 2 127.0.0.1 >NUL
- goto continue
- :3
- start "" "C:UsersusernameDesktopTimer file2.mp3"
- echo.
- pause>nul
- echo Are You Sure?
- pause>nul
- cls
- echo Okay then, Ready..
- Pause>nul
- cls
- goto 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement