Latest posts of: elchabacupra -
Welcome Guest.   Make a donation to an author on the site August 03, 2015, 08:13:57 AM  *

Please login or register.
Or did you miss your validation email?

Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.

You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
  Forum Home Thread Marks Chat! Downloads Search Login Register  
  Show Posts
      View this member's profile 
      donate to someone Donate to this member 
Pages: [1]
1 Software / Post New Requests Here / Re: Audio output device manager on: February 07, 2009, 05:55:10 PM

Come to think of it, one way to improve both scripts would be to somehow bypass the need to setup device name(s) manually in the script...

Ok, I just put this together. Works fine on my XP system but note that it relies on the fact that my audio device names are listed in the registry at the last location noted above. It would be great if someone could quickly check if that registry location lists audio device names on his/her PC too.

[copy or print]
#SingleInstance force
AutoTrim, Off
;________GET AUDIO DEVICE NAMES INTO ARRAY________________
xcount = 1
Loop, HKEY_CURRENT_USER , Software\Microsoft\Windows\CurrentVersion\Applets\Volume Control,2,0
if A_LoopRegName = Options                 ;ignore subkey "Options"
dev%xcount% = %A_LoopRegName%     ;put audio device name in array
xcount += 1
xcount -= 1

;________GET CURRENT AUDIO DEVICE NAME____________________
RegRead, x, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback

Loop, %xcount%
if dev%A_index% != %x%                ;not match current device?
xc := A_index + 1
if xc > %xcount%
xc = 1
xnew := dev%xc%                           ;name of new device
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %xnew%
TrayTip, ,%xnew%, 2,
sleep 2000

I have been trawling the interweb for a while now to find exactly this kind of fix, I thought I should at the very least say this works on my XP SP2 system and I'm going to attempt the same thing on Windows 7 Build 7000, just for kicks.
Pages: [1] | About Us Forum | Powered by SMF
[ Page time: 0.028s | Server load: 0.04 ]

Share on Facebook
submit to reddit