Introduction: Custom Alarm Clock With Notepad

Enjoy Making your own Alarm just Follow the Steps

Step 1: How to Make Alarm Clock

for Alarm to work you have to have an mp3 named Alarm

Type Whats Below In NotePad

@echo off
:main

color 0f

title Alarm Clock

cls
echo Please enter your name

set /p name=
if '%name%' == '' goto Next

:Next
cls

echo Enter your Sign or Symbol.
set /p title=

if '%title%' == '' goto colora
:colora

cls
mode 50,30

title What would you like to change the color to?
cls

echo.
echo What would you like to change the color to?

echo.
echo 0 = Black 8 = Gray

echo 1 = Blue 9 = Light Blue
echo 2 = Green A = Light Green

echo 3 = Aqua B = Light Aqua
echo 4 = Red C = Light Red

echo 5 = Purple D = Light Purple
echo 6 = Yellow E = Light Yellow

echo 7 = White F = Bright White
echo.

echo Type the color combination you would like, or type "exit" to exit.
echo (example: 0f)

color %colorcho%

set /p colorcho=
goto kool

:kool
color %colorcho%

%colorcho%
Title %title%

cls
echo __________________________________________

echo.
echo %name%s Alarm Clock [%Date%]

echo __________________________________________
set /p min=Minutes:

set /p sec=Seconds:
echo Press Any Key To Start Alarm

pause>nul
:time

if /i %sec% lss 10 (set sed=0%sec% ) else ( set sed=%sec% )
cls

title %min%:%sed%
if /i %min% equ 0 ( if /i %sec% equ 0 ( goto :done ))

if /i %sec% equ 0 (
ping -n 2 127.0.0.0 >nul

set sec=59
set /a min=%min%-1

goto :time
) else (

ping -n 2 127.0.0.0 >nul
set /a sec=%sec%-1

goto :time
)

:done
title Wake dafuq Up!!!

cls
Start Alarm.mp3

echo Wake dafuq Up!!!

pause
goto kool

Step 2: How to Save an Run Alarm Clock

Save as AlarmClock.bat

To Run double click on it.

Comments

author
verence made it! (author)2015-03-08

Ignoring that ping -n 2 127.0.0.0 >nul takes slightly longer than 1 second and your alarm clock is therefore not very precise, why does anyone need to enter name and title? They are shown for one moment and then gone. Same for colour. Time is shown in the title bar. The chosen colour is totally irrelevant. Focus on function not on flashy details. BTW: Did you test your batch? I mean, not with correct entries, but with wrong entries? The checks for empty name / title jump in the wrong direction. Better check that the mp3 file is present (if not exist ...)


About This Instructable

2,131views

6favorites

License:

Bio: Returning to Instructables.com To show off my new batch game in the works Called Asteroid Belt! - Raven
More by Raven Codes:Making a game with notepadBatch File TimerCustom Alarm Clock with notepad
Add instructable to: