-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSOUND.AHK
More file actions
31 lines (24 loc) · 1.01 KB
/
SOUND.AHK
File metadata and controls
31 lines (24 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
; Written by Joe Stratton 1/2016
; Used nircmd and devcon tool, see README for more
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Persistent ; no idea if needed
^!Numpad7::setHD800()
^!Numpad9::setTurtles()
setActive() {
Run, cmd.exe
WinWaitActive, Administrator: C:\Windows\System32\cmd.exe, , 1 ; Waits for the cmd prompt
}
setHD800() {
setActive()
Send, nircmd setdefaultsounddevice "HD800" {Enter} ;sets default device to my headphones
Send, exit {Enter} ; Closes command prompt
}
setTurtles() {
setActive()
Send, nircmd setdefaultsounddevice "Turtles" {Enter}
Send, exit {Enter} ; Closes command prompt
}
Return