My computer's headphone connector is broken.
When play music the speaker has no sound, even no headphone is inserted, and speaker is the default playback device.
When play music the speaker has no sound, even no headphone is inserted, and speaker is the default playback device.
So, write this VBS script to make focus and change volume of headphone, then speaker could make sounds...
My computer's headphone connector is broken.
When play music the speaker has no sound, even no headphone is inserted, and speaker is the default playback device.
So, write this VBS script to make focus and change volume of headphone, then speaker could make sounds...
set oShell = CreateObject("WScript.Shell")
oShell.run "%SystemRoot%\System32\SndVol.exe"
WScript.Sleep 100
oShell.SendKeys"+{TAB}" ' Tab to the mute and press space
WScript.Sleep 100
oShell.SendKeys"+{TAB}" ' Tab to the mute and press space
WScript.Sleep 100
oShell.SendKeys"{DOWN}" ' Tab to the mute and press space
WScript.Sleep 100
oShell.SendKeys"{DOWN}" ' Tab to the mute and press space
WScript.Sleep 100
oShell.SendKeys"{ENTER}" ' Tab to the mute and press space
WScript.Sleep 100
oShell.SendKeys"{TAB}" ' Tab to the mute and press space
WScript.Sleep 100
oShell.SendKeys"{TAB}" ' Tab to the mute and press space
Dim counter
counter = 20
While counter > 0
oShell.AppActivate "Volume Mixer"
oShell.SendKeys"{TAB}" ' Tab to the mute and press space
WScript.Sleep 200
oShell.SendKeys"{TAB}" ' Tab to the mute and press space
oShell.SendKeys"{DOWN}" ' Tab to the mute and press space
WScript.Sleep 500
oShell.SendKeys"{UP}" ' Tab to the mute and press space
WScript.Sleep 500
counter = counter - 1
Wend
oShell.AppActivate "Volume Mixer"
oShell.SendKeys"%{F4}" ' ALT F4 to exit the app.
set oShell = nothing
本文介绍了一个VBS脚本,用于解决电脑耳机插孔损坏导致扬声器无法发声的问题。通过运行此脚本可以调整耳机音量设置,从而使扬声器恢复声音输出。
2110

被折叠的 条评论
为什么被折叠?



