From 1fcd636d1feb5eb0e5b2d5dcf67c9ad28846f4ef Mon Sep 17 00:00:00 2001 From: breadcat Date: Thu, 7 Nov 2013 15:33:56 +0000 Subject: Add audio output switcher Copied in entirety from http://ml.pe/optimizing/2013/changing-the-default-sound-device-using-autohotkey/ --- ahk-assistant.ahk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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)::® -- cgit v1.2.3