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?

<< < (7/9) > >>

Carol Haynes:
This version seems to work for me (see attached zip)


--- ---SetTitleMatchMode, Slow

Run, RunDll32.exe shell32.dll`,Control_RunDLL mmsys.cpl`,`,2
WinWait, Sounds and Audio Devices Properties

 IfWinActive, Sounds and Audio Devices Properties, RealTek AC97 Audio
     send, {alt down}d{alt up}s{enter}
 else
     send, {alt down}d{alt up}r{enter}

moerl:
This version seems to work for me (see attached zip)


--- ---SetTitleMatchMode, Slow

Run, RunDll32.exe shell32.dll`,Control_RunDLL mmsys.cpl`,`,2
WinWait, Sounds and Audio Devices Properties

 IfWinActive, Sounds and Audio Devices Properties, RealTek AC97 Audio
     send, {alt down}d{alt up}s{enter}
 else
     send, {alt down}d{alt up}r{enter}-Carol Haynes (April 12, 2006, 07:05 PM)
--- End quote ---
It behaves just the same way as I described earlier. When I have the Sennheiser headset set, this script can switch it to Realtek Audio. However, if Realtek Audio selected, it is not able to switch it to the Sennheiser headset. I wonder why! I mean.. it does work perfectly in one direction... just not in the other :/

moerl:
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.
-jgpaiva (April 12, 2006, 07:01 PM)
--- End quote ---
Oh my... YOU DID IT! Your suggestion fixed the problem! It works now, in both directions :D:D:D. Brilliant! Thank you very much. Thanks to everybody else trying to help as well. Just awesome. Wow ;)

AHK is sweet. Now only to figure out how the hell to use it, and I'll be set!

While I'm at it.. how do I set a hotkey for scripts? And does AutoHotKey itself have its own GUI.. if so, how can it be accessed? I do have an entry for AHK on the start menu, but when I start AutoHotKey it starts with the default INI file and nothing really happens from what I could tell. It just opens the ini file in text-editing mode in notepad.

moerl:
Oops nevermind.. when I start it from the start menu, I get the AHK icon in the system tray and can access it from there. Not that the window that opens makes any sense to me whatsoever, but at least it's working. Of course I have to read the documentation if I want to understand it, and I can't wait to get to that, but I have no time to do that now.

Again, thanks so much to all of you for trying to help.

Carol Haynes:
If you create a shortcut for the script (rather than running it directly) and then right click on the shortcut you can set a global hotkey for that shortcut. Then you should be able to toggle with a single hotkey press to your hearts content ;)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version