Snippets ( AutoIt Audio ): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Edited snippets to conform to template snippet header) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
[[category:Snippets]] | |||
===== | |||
<syntaxhighlight lang="autoit"> | {{Snippet Credit Header}} | ||
== _EnableBeepSpeaker == | |||
{{Snippet Header | |||
|AuthorURL=20477-mrcreator | |||
|AuthorName=MrCreatoR | |||
}} | |||
<syntaxhighlight lang = "autoit"> | |||
; Stop internal "beep" speaker | ; Stop internal "beep" speaker | ||
Line 22: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===== | [[#top | ReturnToContents]] | ||
== _IEclickSound == | |||
{{Snippet Header | |||
| AuthorURL=52303-djarlo | |||
| AuthorName=Djarlo | |||
}} | |||
<syntaxhighlight lang="autoit"> | <syntaxhighlight lang = "autoit"> | ||
$click = _IEclickSound() ;<= off | $click = _IEclickSound() ;<= off | ||
_IEclickSound($click);<== restore original state | _IEclickSound($click);<== restore original state | ||
Func _IEclickSound($sound = "") | Func _IEclickSound($sound = "") | ||
Line 40: | Line 55: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[#top | ReturnToContents]] | |||
<syntaxhighlight lang="autoit"> | == _TalkOBJ == | ||
{{Snippet Header | |||
| AuthorURL=3581-erifash | |||
| AuthorName=erifash | |||
}} | |||
<syntaxhighlight lang = "autoit"> | |||
; Voice Read Text | ; Voice Read Text | ||
Line 54: | Line 76: | ||
EndFunc ;==>_TalkOBJ() | EndFunc ;==>_TalkOBJ() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[#top | ReturnToContents]] |
Latest revision as of 19:27, 13 November 2012
_EnableBeepSpeaker
Author: MrCreatoR
; Stop internal "beep" speaker
_EnableBeepSpeaker(0)
Beep(200, 600)
_EnableBeepSpeaker(1)
Beep(500, 300)
Func _EnableBeepSpeaker($iFlag=0, $iPause=500)
Switch $iFlag
Case 0
Run(@ComSpec & ' /c net stop beep & sc config beep start= disabled', '', @SW_HIDE)
Case Else
Run(@ComSpec & ' /c sc config beep start= system & net start beep', '', @SW_HIDE)
EndSwitch
Sleep($iPause)
EndFunc
_IEclickSound
Author: Djarlo
$click = _IEclickSound() ;<= off
_IEclickSound($click);<== restore original state
Func _IEclickSound($sound = "")
If $sound <> "" Then
If Not FileExists($sound) Then Return SetError(1, 0, 0)
EndIf
Local $rc = RegRead("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Current", "")
If @error Then Return SetError(2, 0, 0)
RegWrite("HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Current", "", "REG_EXPAND_SZ", $sound)
Return $rc
EndFunc ;==>_IEclickSound
_TalkOBJ
Author: erifash
; Voice Read Text
_TalkOBJ("Speak this line of text Please") ; change the text to suit
Func _TalkOBJ($s_text)
Local $o_speech
$o_speech = ObjCreate("SAPI.SpVoice")
$o_speech.Speak ($s_text)
$o_speech = ""
EndFunc ;==>_TalkOBJ()