I was able to get something together that works for me. There is probably a better way to do it, but this works.
#IfWinNotActive, LaunchBox Big Box
$vk07sc000::
run %windir%\System32\DisplaySwitch.exe /external
Run, mmsys.cpl
WinWait,Sound ; Change "Sound" to the name of the window in your local language
ControlSend,SysListView321,{Down 3} ; This number selects the matching audio device in the list, change it accordingly
ControlClick,&Set Default ; Change "&Set Default" to the name of the button in your local language
ControlClick,OK
Send, ^!o
aDown:=A_TickCount
While GetKeyState("vk07sc000")
Duration:=(A_TickCount-aDown)
If (Duration<300)
run "G:\LaunchBox\BigBox.exe"
Else
{}
Return
#IfWinActive, LaunchBox Big Box
$vk07sc000::
aDown:=A_TickCount
While GetKeyState("vk07sc000")
Duration:=(A_TickCount-aDown)
If (Duration<300)
send, x
Else
{}
run %windir%\System32\DisplaySwitch.exe /internal
Run, mmsys.cpl
WinWait,Sound ; Change "Sound" to the name of the window in your local language
ControlSend,SysListView321,{Down 1} ; This number selects the matching audio device in the list, change it accordingly
ControlClick,&Set Default ; Change "&Set Default" to the name of the button in your local language
ControlClick,OK
Send, ^!o
Process, Close, Bigbox.exe
Return