Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Released under the GNU General Public License version 3+ by J2897.
- @echo off
- cls
- setlocal
- color 1b
- title=Countdown Timer
- REM #################### README #################### > BEGIN
- :: Filename: countdown-timer.bat
- :: Version: 1.1
- :: Latest: http://pastebin.com/UY6zmz3i
- :: Contact: https://pastebin.com/message_compose?to=J2897
- ::
- :: This is a simple countdown timer I made. It simply uses Window's "timeout"
- :: Batch function. I made it because the Orzeszek Timer I normally use takes
- :: ages to load on my slow machine. And when I'm in a rush to start a timer,
- :: that can be pretty irritating.
- REM #################### README #################### > END
- set /p "MINS=How many minutes?: "
- echo.
- set /a "SECS=MINS*60"
- if %MINS% LSS 2 (
- set MINUTES=minute
- ) else (
- set MINUTES=minutes
- )
- echo There are %SECS% seconds in %MINS% %MINUTES%.
- timeout /t %SECS%
- set "VLC32=%SYSTEMDRIVE%\Program Files\VideoLAN\VLC\vlc.exe"
- set "VLC64=%SYSTEMDRIVE%\Program Files (x86)\VideoLAN\VLC\vlc.exe"
- set "OPTIONS=--repeat --ignore-config --no-qt-privacy-ask"
- set "AUDIO_FILE=%WINDIR%\Media\tada.wav"
- if exist "%VLC64%" (
- REM Use the 64-Bit version of VLC in repeat mode.
- start "" "%VLC64%" %OPTIONS% "%AUDIO_FILE%"
- ) else (
- if exist "%VLC32%" (
- REM Use the 32-Bit version of VLC in repeat mode.
- start "" "%VLC32%" %OPTIONS% "%AUDIO_FILE%"
- ) else (
- REM Resort to the default audio player.
- start "" "%AUDIO_FILE%"
- )
- )
- color
- endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement