Bri*_*tle 33 audio windows-7 windows-vista playback
我已经将扬声器(音频输入)和耳机(带有自己声卡的 USB 耳机)连接到我的台式计算机。在 Windows 7 下,我可以右键单击混音器并选择播放设备并在这些设备之间切换。
有没有更简单的方法,也许是键盘快捷键,可以更轻松地切换?我在共享空间工作,有时我想要耳机以避免打扰其他人,但有时扬声器还可以。我希望能够快速切换。在理想的世界中,我的问题的解决方案也适用于 Vista。
Dan*_*ker 20
所有烦人的 Windows 自动化问题的解决方案:AutoIt!
把这个 AutoIt 并编译它
;-----Configuration-----
;The title of the sound config window.
Dim $ConfigWindowTitle = "Sound"
;-----End of configuration----
Dim $ItemNumber = 1
If $CmdLine[0] >= 1 Then ;If we have a parameter...
$ItemNumber = $CmdLine[1] ;...we should press the button the specified number of times.
EndIf
Run("control mmsys.cpl") ;Run the sound control applet and hide it.
WinWaitActive($ConfigWindowTitle) ;Wait for it to be active before sending keystrokes.
Send("{TAB}{TAB}{TAB}{TAB}") ;Put the focus on the list
For $i = 1 to $ItemNumber Step 1
Send("{DOWN}")
Next
Send("!s") ;Press Alt + S to set the selected device as the default.
WinClose($ConfigWindowTitle)
Run Code Online (Sandbox Code Playgroud)
现在创建一个快捷方式,并在目标中放置编译的可执行文件的路径。对于参数,将声音设备的编号放入要切换到的列表中。(要切换到列表中的顶部项目,请放 1,列表中的第二项,放 2,等等)。如果您需要键盘快捷键,请使用快捷键属性窗口中的快捷键字段。
我一直在寻找可以做你想做的事情,发现没有程序化的方式可以在 Vista/7 中切换音频设备。这不是微软决定程序员需要做的事情,所以我制作了这个脚本来自动化这个过程。这不是最好的,因为它会弹出窗口以更改设备(必要的),但它可以创建快捷方式来更改声音的输出设备。
| 归档时间: |
|
| 查看次数: |
76865 次 |
| 最近记录: |