Created
June 21, 2014 13:09
-
-
Save ronihcohen/1a55e2862e85116e90f6 to your computer and use it in GitHub Desktop.
Toggle default sound device - Windows 7 , autohotkey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ScrollLock:: | |
switch := !switch | |
If (switch) | |
usePlaybackDevice(1) | |
else | |
usePlaybackDevice(4) | |
return | |
usePlaybackDevice(device) { | |
Run, mmsys.cpl | |
WinWaitActive, Sound ahk_class #32770 | |
ControlSend, SysListView321,{Down %device%}, Sound ahk_class #32770 | |
ControlClick, Button2, Sound ahk_class #32770 | |
WinClose, Sound ahk_class #32770 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment