Jump to content

Changing audio output device - WinXP home SP2


rbmcgee
 Share

Recommended Posts

Hi all,

Brand new to Autoit. I read about autoit on the girder (automation software) forum and possibly it can assist me.

I have 2 audio output devices on my PC. One are speakers and the other is a pair of USB headphones. There are times when I want to switch devices, and presently, I have to go into control panel (sounds, audio, etc.) and manually switch output devices. Can autoit automate this process? I will then have girder execute these 2 (?) scripts, one to change to speakers and one to change to headphones.

I've looked quickly through a search and didn't find any answer.

Here's the problem, I'm not a code writer and have almost no idea how to write any code. Best would be if someone has already written this script and I can steal it. Otherwise I will need some detailed coaching.

Hopefully this isn't asking too much. Thanks in advance.

Link to comment
Share on other sites

This may be as simple as a registry setting. You could check to see what the setting is for when one device is active, change it, and then see what changed in the registry. Save the change to reg file, then make a simple script to switch back and forth. I couldn't begin to tell you where to look in the registry for I would need to be in front of your PC to look. I know this isn't much, but is is a start on pointing you in the right direction.

Link to comment
Share on other sites

Check out HKCU\Software\Microsoft\Multimedia\Sound Mapper\Playback

you can use RegWrite(HKCU\Software\Microsoft\Multimedia\Sound Mapper, Playback, REG_SZ, DeviceName)

for more detailed information look for RegWrite in the help file.

Also you should look into RegMon and possibly FileMon from system internals. Its free and you can use it to identify what is happening to the Registry or Files at any given moment, like when you change the output device :whistle:

MUHAHAHAHAHA

Link to comment
Share on other sites

question...

y do u have 2 which the output port?

i do this all the time wit my comp and ive never done this b4, it always just works or does it give better sound when it is switch to head phones if so ill help you with your program cause i would like to do the same thing when im playing games ;)

nvm i just relized u said usb headphones :whistle:;) ill still help u code it :D just pm if u want help :P

Edited by Golbez
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...