Popeye1 Posted February 11, 2010 Share Posted February 11, 2010 Is there a way to make autoit play an audio alarm from my pc if a certain event happens? Preferably through the motherboard of the pc rather than the speaker, you know how a computer can make alert sounds like a beep. Link to comment Share on other sites More sharing options...
whim Posted February 11, 2010 Share Posted February 11, 2010 Check Beep in the help file Link to comment Share on other sites More sharing options...
Bert Posted February 11, 2010 Share Posted February 11, 2010 beep is the command you are looking for. It is in the help file. http://www.autoitscript.com/autoit3/docs/functions/Beep.htm The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Popeye1 Posted February 11, 2010 Author Share Posted February 11, 2010 (edited) beep is the command you are looking for. It is in the help file.http://www.autoitscript.com/autoit3/docs/functions/Beep.htmFound the code in the help file but it's a little complex for me and for what I want it to do. I just want it to make a constant beep that sounds a bit like an alarm if certain conditions are met. Can anyone break it down into a simpler form?For instance, it checks to see what colours are found at a certain pixel, if colour X is found, play this bit of code (the alarm part, just can't figure out how to add it in a simple form)Like, check coordinates X Y, if ABC(sound high pitch alarm without ever stopping) - This is the part I don't know how to add, in the brackets, just a simple constant beep, I don't need it complex. Edited February 11, 2010 by Popeye1 Link to comment Share on other sites More sharing options...
Bert Posted February 11, 2010 Share Posted February 11, 2010 Found the code in the help file but it's a little complex for me and for what I want it to do. I just want it to make a constant beep that sounds a bit like an alarm if certain conditions are met. Can anyone break it down into a simpler form?For instance, it checks to see what colours are found at a certain pixel, if colour X is found, play this bit of code (the alarm part, just can't figure out how to add it in a simple form)Like, check coordinates X Y, if ABC(sound high pitch alarm without ever stopping) - This is the part I don't know how to add, in the brackets, just a simple constant beep, I don't need it complex.This is basic. If you can't grasp how to do this, then take AutoIt 1 2 3. The link is in my signature. Trust me when I tell you this - Take the AutoIt course, then try to do what you have in mind. It will be cake after you take the course. Yes, it is that easy. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Popeye1 Posted February 11, 2010 Author Share Posted February 11, 2010 This is basic. If you can't grasp how to do this, then take AutoIt 1 2 3. The link is in my signature. Trust me when I tell you this - Take the AutoIt course, then try to do what you have in mind. It will be cake after you take the course. Yes, it is that easy.While 1 ;start master loop Local $iFreq = 2500 _WinAPI_Beep($iFreq, 120) WEnd ; end master loopSo far i've got that, it works, but I want to set it to only sound for 60 seconds, how can I set that? Link to comment Share on other sites More sharing options...
whim Posted February 11, 2010 Share Posted February 11, 2010 Well the help file says_WinAPI_Beep($iFreq = 500, $iDuration = 1000)so try _WinAPI_Beep($iFreq, 60 * 1000) (that's because the duration is in milliseconds)plus, you have to place the command outside that While ... Wend loop, or it'll still go on foreverPS A bit ironical that you chose _WinAPI_Beep and not Beep, considering it was you that complained about complication ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now