Switching between 2 audio outputs with a hotkey in Windows

Описание к видео Switching between 2 audio outputs with a hotkey in Windows

0:00 Into
0:13 AudioDeviceCmdlets for Powershell
0:59 AudioSwitch.ps1
2:03 Downloading WinHotKey
2:14 Setting up WinHotKey


AudioSwitch.ps1 script (remember to replace the import module path if it differs from yours!)
----
Import-Module 'C:\Program Files\WindowsPowerShell\Modules\AudioDeviceCmdlets'
$curAudioIndex = (Get-AudioDevice -Playback | findstr Index).substring(23)
if ($curAudioIndex -eq 2)
{
Set-AudioDevice -Index 3
}
else
{
Set-AudioDevice -Index 2
}
----

And command line arguments for Powershell (remember to replace the script path!)
----
-executionpolicy unrestricted -windowstyle hidden "& ""C:\Path\To\Your\Script\AudioSwitch.ps1"""
----

Комментарии

Информация по комментариям в разработке