Welcome Guest.   Make a donation to an author on the site July 28, 2014, 03:30:23 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Noisemaker  (Read 5378 times)
nhk220
Charter Member
***
Posts: 3

View Profile Give some DonationCredits to this forum member
« on: August 21, 2005, 09:56:02 AM »

I would like to have a program that runs on XP that will generate a musical tone form 1-3 seconds in length at random time intervals that I can specify.  E.G. random beeps from 2 to 9 minutes.  It would be nice if it would run behind any other programs running at the time.  Cheers
Logged
mouser
First Author
Administrator
*****
Posts: 33,183



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: August 21, 2005, 10:37:26 AM »

some questions:

does it matter what tone? random tone? fixed tone?

you want to be able to say, generate a tone every 7 minutes that lasts for 2 seconds, or you want to say, generate a tone ever x minutes (where x can change and be random from 2 to 9 minutes) of random duration that can range from 1-3 seconds.

what a strange request - mind telling us what it is to be used for?
Logged
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: August 21, 2005, 07:38:16 PM »

 huh Noisemaker waits ... minutes, plays random 1-3 second notes for ... minutes.

Fearful of the new terrorist act, I still post this solution to the request.

Download and install AutoHotKey from www.autohotkey.com. Save the script as Noisemaker.ahk and doubleclick to run.

Skrommel


[copy or print]
;Noisemaker.ahk
; Waits ... minutes, plays random 1-3 second notes for ... minutes
;Skrommel @2005

#Persistent

IN:
InputBox,in,Noise,Start playing in ... minutes:
If in<1
  Goto,IN

FOR:
InputBox,for,Noise,Play for ... minutes:
If for<1
  Goto,FOR

in*=60000
for*=60000
SetTimer,START,%in%
Return

START:
SetTimer,START,Off
SetTimer,STOP,%for%
Loop
{
  Random,duration,1000,3000
  Random,frequency,200,10000
  SoundBeep,%frequency%,%duration%
}

STOP:
SetTimer,STOP,Off
ExitApp
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
zridling
Friend of the Site
Charter Member
***
Posts: 3,289


Linux captive

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: August 21, 2005, 08:47:31 PM »

Oh man, am I going to have some devious fun with this. "Dang, Boss, looks like you've got the latest Sasser worm! I'm going to need your credit cards and all your available cash to fix it."
 smiley
Logged

- zaine (on Google+)
nhk220
Charter Member
***
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #4 on: August 22, 2005, 05:52:16 AM »

As I reread my first post I see that I didn't explain my need very well the first time.

I need to generate a tone for 1-3 seconds, once every few minutes. The time inteval between tones needs to vary, and I need to be able to specify the extremes on the time delay interval: it might be from 1-3 minutes one time and 5-20 minutes the next.

The tone can be the same tone (one easily heard) or it can vary as well. 

The program needs to run until I stop it, so if it could monitor for a keypress, that would be nice, or I can just stop it from the task bar as I did with ahk.

Thanks so much.

Cheers
Logged
skrommel
Fastest code in the west
Developer
***
Posts: 882



View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: August 22, 2005, 06:12:45 AM »

 smiley NoiseMaker v2.0 - Waits a random number of minutes, plays a random note for 1-3 sec, waits a random number of minutes...

Skrommel


[copy or print]
;NoiseMaker.ahk v2.0
; Waits ... minutes, plays a random note for 1-3 sec, waits
;Skrommel @2005

#Persistent

SHORT:
InputBox,short,NoiseMaker,Shortest pause (in minutes):
If short<1
  Goto,SHORT

LONG:
InputBox,long,NoiseMaker,Longest pause (in minutes):
If long<%short%
  Goto,LONG

Loop
{
  Random,duration,1000,3000
  Random,frequency,200,5000
  SoundBeep,%frequency%,%duration%
  Random,pause,%short%,%long%
  pause*=60000
  Sleep,%pause%
}
Logged

Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
mouser
First Author
Administrator
*****
Posts: 33,183



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: August 22, 2005, 07:03:17 AM »

skrommel is the best  Kiss

i'll update the noisemaker in skrommel's pack#2 when this gets to final version,
but this might be a good time to recap how easy it is to make a standalone exe out of these autohotkey scripts.

just install autohotkey from http://www.autohotkey.com/

then copy and paste skrommels script to a text editor (like notepad) and save it as as he says (noisemaker.ahk).

now you can double click that ahk to run it inside autohotkey right away

OR

right click on it from windows explorer and select compile

OR

from your start menu autohotkey group choose "convert .ahk to .exe" and select it.

voila you have a standalone exe you can run on any computer.
Logged
nhk220
Charter Member
***
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #7 on: August 22, 2005, 07:17:21 PM »

Wow!

I do believe you have done it.  This is great!  I can't wait to try it out.

I really do believe all the good things people have said about you now! 

Thnak you, thank you, thank you!
Logged
Carol Haynes
Waffles for England (patent pending)
Global Moderator
*****
Posts: 7,952



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: August 22, 2005, 07:36:56 PM »

Still intrigues though - what is this for ????

Come on spill the beans  Angry
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.036s | Server load: 0.2 ]