Generates simple tones on the speaker
#include <WinAPIError.au3>
_WinAPI_Beep ( [$iFreq = 500 [, $iDuration = 1000]] )
$iFreq | [optional] The frequency of the sound, in hertz. This parameter must be in the range 37 through 32,767. |
$iDuration | [optional] The duration of the sound, in milliseconds. Windows Me/98/95: This parameter is ignored. |
Success: | True |
Failure: | False |
Muting and volume control have no effect on Beep. You will still hear the tone.
Search Beep in MSDN Library.
#include <MsgBoxConstants.au3>
#include <WinAPIError.au3>
Example()
Func Example()
Local $iFreqStart = 100
Local $iFreqEnd = 250
MsgBox($MB_SYSTEMMODAL, "_WinAPI_Beep Example", "Ascending")
For $iFreq = $iFreqStart To $iFreqEnd
_WinAPI_Beep($iFreq, 100)
ToolTip("Frequency = " & $iFreq)
Next
MsgBox($MB_SYSTEMMODAL, "_WinAPI_Beep Example", "Descending")
For $iFreq = $iFreqEnd To $iFreqStart Step -1
_WinAPI_Beep($iFreq, 100)
ToolTip("Frequency = " & $iFreq)
Next
EndFunc ;==>Example