Arterie Posted August 24, 2007 Share Posted August 24, 2007 (edited) I have 2 Soundcard for my Pc...one onboard and the other one is my headset. but sometimes i ant to hear with my speakers and manullay switching bores me. So it would be nice if you could help me..here the code(very easy) I only want to change the soundoutput $card1 =;first soundcart(Realtek) $card2 =;second soundcart(Logitech) $current =;the cart wich is currently used If $current = $card1 Then ;set $card2 the current one ElseIf $current = $card2 Then ;set $card1 the current one EndIf MsgBox(64,"Soundcard","The currently used Soundcard is: "& $current) Edited August 24, 2007 by Arterie Link to comment Share on other sites More sharing options...
Arterie Posted August 24, 2007 Author Share Posted August 24, 2007 (edited) Ok solved this on my own. If some one is interested in this script: $card1 = "Realtek AC97 Audio" $card2 = "Logitech USB Headset" $current = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","Playback") If $current = $card1 Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","Playback","REG_SZ",$card2) ElseIf $current = $card2 Then RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","Playback","REG_SZ",$card1) EndIf $current = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper","Playback") MsgBox(64,"Soundcard","The currently used Soundcard is: "& $current) Edited August 24, 2007 by Arterie Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now