REM File name: Reminder.batREM Description: this is a Batch file that plays a song every 10 mins.REM The song can be specified in place of "D:\dwnlds\AIRTEL.wav":again@echo offREM Takes the system timeset t=%time%REM t2 = secondsset t2=%t:~6,2%REM t1 = minutesset t1=%t:~3,2%REM One can specify at what minutes do you want a reminderif %t1%==00 goto alarmif %t1%==10 goto alarmif %t1%==20 goto alarm
if %t1%==30 goto alarm
if %t1%==40 goto alarm
if %t1%==50 goto alarmREM provides a delay of 1 sec.CHOICE /n /C 12 /d 1 /t 1clsif errorlevel == 1 goto againif errorlevel == 2 goto again:alarmif %t2%==30 goto singclsgoto again:singREM can provide the link to the desired media player like VLC,etc.REM provide the link to the compatible audio file. start "C:\Program Files\Windows Media Player\wmplayer.exe" "D:\dwnlds\AIRTEL.wav"REM provides a delay of 1 minute.CHOICE /n /C 12 /d 1 /t 60clsif errorlevel == 1 goto againif errorlevel == 2 goto againgoto again
Thursday, September 8, 2011
15 min Alarm part2
So , here i am with the code. Rather i have two. I have one which is based in 'absolute times' using the system clock and the other is based on 'relative time'.
This is the code for the 'absolute time' based reminder. Reminds at 10,20,30,40,50 and 00 minutes on the clock.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment