Code updated
This commit is contained in:
parent
62bca9f707
commit
232ca9bd5e
@ -5,61 +5,34 @@ Menu, Tray, NoStandard
|
|||||||
|
|
||||||
Menu, Tray, Add, Info, InfoMenu
|
Menu, Tray, Add, Info, InfoMenu
|
||||||
Menu, Tray, Add, Exit, MenuExit
|
Menu, Tray, Add, Exit, MenuExit
|
||||||
<<<<<<< HEAD:hyperaudio.ahk
|
|
||||||
|
|
||||||
<<<<<<< HEAD:hyperaudio.ahk
|
|
||||||
device1:="Headset"
|
device1:="Headset"
|
||||||
device2:="Lautsprecher"
|
device2:="Lautsprecher"
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
; 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
|
|
||||||
=======
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
>>>>>>> e6983016938e949bb809e797643ad89e4178e4f7: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}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user