Readme added
This commit is contained in:
parent
99533c7a78
commit
2ed69260dd
25
Readme.md
Normal file
25
Readme.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# HyperAudio
|
||||||
|
|
||||||
|
HyperAudio is an AutoHotkey (AHK) script to toogle two Audio Output Devices for Windows 10.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Run AHK Script or compile it yourself or download precompiled release.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
First run will create a hyperaudio.ini file.
|
||||||
|
Edit Names of Audio Output Devices. Extract Names from Windows Sound Settings.
|
||||||
|
|
||||||
|
Example
|
||||||
|
```
|
||||||
|
**Headset** (Realtek High Definiton Audio)
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
||||||
|
|
||||||
|
Please make sure to update tests as appropriate.
|
||||||
|
|
||||||
|
## License
|
||||||
|
[GNU GPL v3](https://choosealicense.com/licenses/gpl-3.0/)
|
||||||
|
|
@ -2,12 +2,38 @@
|
|||||||
#Persistent ; Keep the script running until the user exits it.
|
#Persistent ; Keep the script running until the user exits it.
|
||||||
Menu, Tray, Tip , Default Audio Device Changer
|
Menu, Tray, Tip , Default Audio Device Changer
|
||||||
Menu, Tray, NoStandard
|
Menu, Tray, NoStandard
|
||||||
Menu, Tray, Add, Exit, MenuExit ; Creates a new menu item.
|
|
||||||
|
|
||||||
|
Menu, Tray, Add, Info, InfoMenu
|
||||||
|
Menu, Tray, Add, Exit, MenuExit
|
||||||
|
|
||||||
|
<<<<<<< HEAD:hyperaudio.ahk
|
||||||
device1:="Headset"
|
device1:="Headset"
|
||||||
device2:="Lautsprecher"
|
device2:="Lautsprecher"
|
||||||
; http://www.daveamenta.com/2011-05/programmatically-or-command-line-change-the-default-sound-playback-device-in-windows-7/
|
; http://www.daveamenta.com/2011-05/programmatically-or-command-line-change-the-default-sound-playback-device-in-windows-7/
|
||||||
|
=======
|
||||||
|
versionnumber := "1.1"
|
||||||
|
device1 := "Headset"
|
||||||
|
device2 := "Lautsprecher"
|
||||||
|
|
||||||
|
if not A_IsAdmin
|
||||||
|
{
|
||||||
|
msgbox, 48,Administrator Rights Warning, Please run as Admin.
|
||||||
|
sleep, 250
|
||||||
|
exitapp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
installed_in=%A_ScriptDir%
|
||||||
|
IfExist, %installed_in%\hyperaudio.ini
|
||||||
|
{
|
||||||
|
iniread, device1, %installed_in%\hyperaudio.ini, Devices, Output1, %device1%
|
||||||
|
iniread, device2, %installed_in%\hyperaudio.ini, Devices, Output2, %device2%
|
||||||
|
} else {
|
||||||
|
iniwrite, %device1%, %installed_in%\hyperaudio.ini, Devices, Output1
|
||||||
|
iniwrite, %device2%, %installed_in%\hyperaudio.ini, Devices, Output2
|
||||||
|
}
|
||||||
|
|
||||||
|
>>>>>>> e698301... Gui Added. Admin Warning added. Config file added:HyperAudio.ahk
|
||||||
Devices := {}
|
Devices := {}
|
||||||
IMMDeviceEnumerator := ComObjCreate("{BCDE0395-E52F-467C-8E3D-C4579291692E}", "{A95664D2-9614-4F35-A746-DE8DB63617E6}")
|
IMMDeviceEnumerator := ComObjCreate("{BCDE0395-E52F-467C-8E3D-C4579291692E}", "{A95664D2-9614-4F35-A746-DE8DB63617E6}")
|
||||||
|
|
||||||
@ -52,11 +78,11 @@ $!WheelUp::Send {Volume_Up 5}
|
|||||||
$!WheelDown::Send {Volume_Down 5}
|
$!WheelDown::Send {Volume_Down 5}
|
||||||
currentDevice:=false
|
currentDevice:=false
|
||||||
^F12::
|
^F12::
|
||||||
currentDevice:=!currentDevice
|
currentDevice:=!currentDevice
|
||||||
if currentDevice
|
if currentDevice
|
||||||
SetDefaultEndpoint( GetDeviceID(Devices, device1) )
|
SetDefaultEndpoint( GetDeviceID(Devices, device1) )
|
||||||
else
|
else
|
||||||
SetDefaultEndpoint( GetDeviceID(Devices, device2) )
|
SetDefaultEndpoint( GetDeviceID(Devices, device2) )
|
||||||
return
|
return
|
||||||
|
|
||||||
SetDefaultEndpoint(DeviceID)
|
SetDefaultEndpoint(DeviceID)
|
||||||
@ -69,12 +95,41 @@ SetDefaultEndpoint(DeviceID)
|
|||||||
GetDeviceID(Devices, Name)
|
GetDeviceID(Devices, Name)
|
||||||
{
|
{
|
||||||
For DeviceName, DeviceID in Devices
|
For DeviceName, DeviceID in Devices
|
||||||
If (InStr(DeviceName, Name))
|
If (InStr(DeviceName, Name))
|
||||||
Return DeviceID
|
Return DeviceID
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuExit:
|
MenuExit:
|
||||||
{
|
{
|
||||||
ExitApp
|
ExitApp
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
||||||
|
InfoMenu:
|
||||||
|
{
|
||||||
|
Gui, 2:+AlwaysOnTop +Caption +MinimizeBox +ToolWindow ; +SysMenu
|
||||||
|
|
||||||
|
Gui, 2:Font, s20, Impact
|
||||||
|
Gui, 2:Add, Text, x15 y20 w280 r1 , HyperAudio, 2021
|
||||||
|
|
||||||
|
Gui, 2:Font, s8, Lucida Sans Unicode
|
||||||
|
Gui, 2:Add, Button, x255 y190 w50 h30 gInfoclose vInfoclose, OK
|
||||||
|
Gui, 2:Add, Text, x15 y60 w200 +Left, Alt+WheelUp:`nAlt+WheelDown:
|
||||||
|
Gui, 2:Add, Text, x105 y60 w200 +Left, Increase Volume +5`nDecrease Volume +5
|
||||||
|
|
||||||
|
|
||||||
|
Gui, 2:Add, Text, x15 y100 w200 +Left, Ctrl+F12
|
||||||
|
Gui, 2:Add, Text, x105 y100 w200 +Left, Toggle Audio Output Device`n(Configure Device Names in ini File)
|
||||||
|
|
||||||
|
Gui, 2:Add, Text, x15 y150 w200 +Left, Version: %versionnumber%
|
||||||
|
Gui, 2:Add, Text, x15 y175 w200 +Left, Shimao-Blackrock
|
||||||
|
|
||||||
|
Gui, 2:Show, h235 w320, HyperAudio
|
||||||
|
}
|
||||||
|
return
|
||||||
|
|
||||||
|
Infoclose:
|
||||||
|
{
|
||||||
|
Gui, 2:Destroy
|
||||||
|
}
|
||||||
|
return
|
||||||
|
BIN
hyperaudio.exe
BIN
hyperaudio.exe
Binary file not shown.
Loading…
Reference in New Issue
Block a user