How to create Create an Alarm In BatchThis is a featured page

Due to some problem with the server I am not able to upload the pictures if u want in graphical manner please download the attachment given below.

Step 1:Capture The "Alarm" In order to create an alarm, we will need a sound. There is a special character that when in a batch file or entered in command prompt, will cause a tone to play through the internal speaker. In order to get that special character, you need to do a key combo in command prompt then save it so you can copy and paste it. Thats what I'll do in the next few steps

Step 2: Open Command Prompt Goto start> run, then type in cmd, then press OK

or Goto start> All Programs> Accessories> Command Prompt

Step 3: Change Directory

Once in command prompt, type cd desktop That will change the directory command prompt is in to the desktop.

Step 4: Echo, ECHO! Now that

you've navigated to the desktop, type this: echo @echo

Step 5: Key Combo

Now hold down ALT & 7 (must be on the numpad) at the same time. "G" should appear.

Step 6: Save as Batch

Now Type: >alarm.bat ">" means save and "alarm.bat" is what you are saving it as.

Make sure you remember the ".bat" part, or it wont be saved as a batch file.

Step 7: Obtain The Character

Right click on the newly created batch file and click Edit. Then select the box looking letter that is the character, and copy it. You've now successfully captured the rare alarm character! Clap Clap Clap...

Step 8: Delete

You can now delete the file "Alarm.bat

Step 9: Alarm Code

First, open Notepad. Then type: @echo off :alarm "@echo off" means that it won't show you whats happening. Keeps batch files clean.
":alarm" is a label

Then paste the special character under that.

Next type: cls goto alarm "cls" means clear screen. It just removes everything on screen off the command prompt. Sorta like a dry erase board. "goto

alarm" means that it will goto the label ":alarm" Goto File> Save As, and save it as "Alarm.bat"

Step 10: Done! You can now run the batch file

"Alarm.bat" and it will sound an alarm through your computer speakers! One neat thing to do is if you have a password protected batch file, you can

sound an alarm if they get the password wrong! I have included it in a bonus step

Step 12: Password

ONLY DO THIS IF YOU ARE FAMILIAR WITH BATCH!

Here is it in a password: @echo off title Password Echo Please enter password to proceed. set /p udefine= set variable1=(Yourpasswordhere) if %udefine%==%variable1% ( goto correct cls ) cls color 0c echo Invalid Password! pause goto alarm :correct (rest of batch file here) :alarm cls go to alarm


naveen98859
naveen98859
Latest page update: made by naveen98859 , Aug 23 2008, 5:22 AM EDT (about this update About This Update naveen98859 Edited by naveen98859

1 word added
1 word deleted

view changes

- complete history)
Keyword tags: None
More Info: links to this page

Anonymous  (Get credit for your thread)


There are no threads for this page.  Be the first to start a new thread.
Word Document How to create Alarm in batch.doc (Word Document - 170k)
posted by naveen98859   Aug 23 2008, 5:26 AM EDT
How to create Alaram in Batch