commit 1fcd636d1feb5eb0e5b2d5dcf67c9ad28846f4ef
parent 742261119faa76b28729dcb3b739df243249ec78
Author: breadcat <sendforththegunboats@gmail.com>
Date: Thu, 7 Nov 2013 15:33:56 +0000
Add audio output switcher
Copied in entirety from
http://ml.pe/optimizing/2013/changing-the-default-sound-device-using-autohotkey/
Diffstat:
1 file changed, 17 insertions(+), 0 deletions(-)
diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk
@@ -117,6 +117,23 @@ if toggle := !toggle
return
+;toggle between default audio output (http://ml.pe/optimizing/2013/changing-the-default-sound-device-using-autohotkey/)
+^!Space::
+ switch := !switch
+ If (switch)
+ usePlaybackDevice(1)
+ else
+ usePlaybackDevice(2)
+ 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
+}
+
+
;auto replace text with symbols
::(c)::©
::(r)::®