Of the 5 playback devices listed (in my sound card settings), I want to toggle between device 1 and 3. How may I edit the default command list for "Change Default Audio Device":
toggle32:=!toggle32
Run, mmsys.cpl
WinWaitActive,Sound
if toggle32
ControlSend,SysListView321,{Down}
else
ControlSend,SysListView321,{Down 2}
Sleep, 50
ControlClick,Button2
ControlClick,OK
Thank you.
How to edit customize, "Change Default Audio Device"
This command simply opens a Playback devices window, presses "down" key once or twice and then presses OK button. In your case, you need to press "down" key three times to select a third device so just replace {Down 2} with {Down 3}. When you understand this simple logic, you may experiment by yourself.
This may work for you:
This may work for you:
Code: Select all
toggle32:=!toggle32
Run, mmsys.cpl
WinWaitActive,Sound
if toggle32
ControlSend,SysListView321,{Down}
else
ControlSend,SysListView321,{Down 3}
Sleep, 50
ControlClick,Button2
ControlClick,OK