Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

[IDEAS]School Project[IDEAS]

Hi everyone!

Here's the thing; I'm having a school project where we're supposed to make a timer, counting up to a minute and then making a sound/beep or whatever.

I'm making mine in Batch, so any ideas on what to include, or tips for the design?

Thankful for any help ^^
Is it even possible to make the batch file make a sound from the origin file, idk if its possible to play it straight from CMD, it might have to open a audio file from your dir.

And ooh, if you have the code for the timer can i have it please?
What OS you running on? This'll work on any windows but XP and lower I'm pretty sure

Code
@echo off
::Loop
set /a timer=0
set /a limit=60 ::Amount of seconds you want it to run
:start
cls
echo Time: %timer% seconds
timeout 1 >nul
if %timer% LESS %limit% goto start
::End Loop

CODE STUFF HERE
pause >nul

~Ultim8um 🤝
shit man, im running on Windows Seven :(
To set the beep you need to open a cmd window and type..
Code
echo @echo Alt+7>beep.bat

The catch here is you use the Alt key and 7 with Num Lock key pressed on the numeric keypad and not the regular keyboard.

This will now create a beep.bat run it and see. :)
Thanks for the ideas everyone, especially 'bout the beep and code suggestion (pretty much the only ones I've gotten so far, though)...

I'll post the code when I'm done and see what you think, hopefully it's OK ^^
(May 16, 2012 03:41 AM)Revo. Wrote:  shit man, im running on Windows Seven :(

Are you trying to run edit.com, you could try Vim ?
how about making the timer count down to whatever you want then restarting and asking again maybe a graphical (you know what i mean) countdown
To make it beep, do this:
1. Open the command prompt, and type "echo "
2. Push CTRL+G. It should show up as ^G.
3. Type " > temp.bat" and hit enter.
4. Type "notepad temp.bat"

The window should have a little box in the window, in front of it put "echo. "

Running that code will cause your computer to beep.
Use the built in "timeout" function to get an accurate second count....
[Image: ojtVLAc.png]



(May 16, 2012 12:21 PM)White Light Wrote:  To make it beep, do this:
1. Open the command prompt, and type "echo "
2. Push CTRL+G. It should show up as ^G.
3. Type " > temp.bat" and hit enter.
4. Type "notepad temp.bat"

The window should have a little box in the window, in front of it put "echo. "

Running that code will cause your computer to beep.

That's actually really handy!
Would +1 you for that if I could.

If you're really that dumb and couldn't follow his instructions, here's the end result:
Beeping batch file

or

Beeping batch file (link 2)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by BaussHackerApr 15, 2011 02:15 AM 45 405 Apr 15, 2011 02:15 AM
Last Post: BaussHacker
[.NET] by BaussHackerApr 14, 2011 02:47 AM 103 1,285 Apr 14, 2011 02:47 AM
Last Post: BaussHacker
[.NET] by okmijnlp2Feb 3, 2011 12:23 PM 5 155 Feb 3, 2011 12:23 PM
Last Post: Toph Beifong