How to edit customize, "Change Default Audio Device"

Discussion, questions and support.
Post Reply
Owl Box
Posts: 1
Joined: Jul 5th, ’14, 01:18

Post by Owl Box » Jul 5th, ’14, 01:27

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.
thinman
Posts: 31
Joined: May 17th, ’13, 15:44

Post by thinman » Jul 5th, ’14, 10:34

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. :D

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
Post Reply