summaryrefslogtreecommitdiffstats
path: root/ahk-assistant.ahk
diff options
context:
space:
mode:
authorbreadcat2013-11-07 15:33:56 +0000
committerbreadcat2013-11-07 15:33:56 +0000
commit1fcd636d1feb5eb0e5b2d5dcf67c9ad28846f4ef (patch)
tree45e611818015ef5f18d7eeb45b829b065d75059f /ahk-assistant.ahk
parent742261119faa76b28729dcb3b739df243249ec78 (diff)
downloadahka-1fcd636d1feb5eb0e5b2d5dcf67c9ad28846f4ef.tar.gz
ahka-1fcd636d1feb5eb0e5b2d5dcf67c9ad28846f4ef.tar.bz2
ahka-1fcd636d1feb5eb0e5b2d5dcf67c9ad28846f4ef.zip
Add audio output switcher
Copied in entirety from http://ml.pe/optimizing/2013/changing-the-default-sound-device-using-autohotkey/
Diffstat (limited to 'ahk-assistant.ahk')
-rw-r--r--ahk-assistant.ahk17
1 files changed, 17 insertions, 0 deletions
diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk
index 1c0354f..64e6d0c 100644
--- 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)::®