diff options
-rw-r--r-- | ahk-assistant.ahk | 17 |
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)::® |