ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

DONE: A shortcut/hotkey to switch between audio devices?

<< < (6/9) > >>

moerl:
Hmmmm.. ok. I downloaded the script file, double clicked it while Realtek Audio is active, and while I do see the Audio properties popup and disappear right away, nothing changes. The device is not switched.

This is the script I used:


--- ---SetTitleMatchMode, Slow

Run, RunDll32.exe shell32.dll`,Control_RunDLL mmsys.cpl`,`,2
WinWait,ahk_class #32770

IfWinActive, ahk_class #32770, RealTek AC97 Audio
     send, {alt down}d{alt up}s{enter}
else
     send, {alt down}d{alt up}r{enter}

moerl:
I just found out something else as well that's interesting. If I have the system set to use the Sennheiser headset and THEN execute the AHK script, it works EXACTLY as desired, switching the used sound device from the headset to the system's soundcard, Realtek Audio. However, if Realtek is selected first and the script is executed, no change occurs. In other words, the script works exactly as it should, but only one way...

Carol Haynes:
Looks like the ahk_class parameter is set incorrectly ... I'll see if I can work out what it should be tomorrow.

moerl:
Thanks :). I wish I could do it myself but I don't even have a damn clue how that super simple script I have now works... so... thanks.

jgpaiva:
The problem is that it is never noticing that the string " RealTek AC97 Audio" is in the window.
Try changing that line to "IfWinActive,ahk_class #32770,Realtek". I don't think that'll solve it, but it's worth trying.
Still, if that doesn't work, you can always make 2 different scripts, as Carol mentioned. Or, if you use it very often, make one script, with hotkeys.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version