Jump to content
Sign in to follow this  
nick

Control Panel

Recommended Posts

nick

I would like to be able to toggle two items in a control panel applet combobox: more specifically I want to be able to switch between two devices listed in the Sounds and Audio Devices Properties box, Audio tab, Sound Playback section, Default Device combo box.

Any pointers or help would be appreciated: I'm not asking for code to be written.

Thanks

Share this post


Link to post
Share on other sites
ning

This seems to work:

ControlCommand ( "Sounds and Audio Devices Properties", "", "ComboBox1", "SetCurrentSelection", 1 )

Change the final parameter to 0 or 1 depending on which item you want to select in the combo box. (You may need to use ControlGetText or something, depending on whether you know the ordering of the combo box already.)

I got the name "ComboBox1" using the Window Info tool.

hope that helps

ben

Share this post


Link to post
Share on other sites
MHz

Just before ning line, add this

Run('control mmsys.cpl,,2')
WinWait('Sounds and Audio')

Share this post


Link to post
Share on other sites
nick

Thank you both for taking the time to reply. Is there any way of passing this function to the control panel applet 'silently'; so that a user would not see the applet or at the very least it would appear very briefly.

My final goal is to have an executable that a user would double click on to 'toggle' between two sound output devices i.e. between a sound card and a Lyra device.

Thanks for any advice you can give.

Nick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×