I just installed AutoHotKey and I am trying to assign a keyboard shortcut to execute specific code that will simply run a registry file in one of my folders.
Basically I'm try to assign a keyboard shortcut to switch speaker configurations in Windows 7 (between 2.1 stereo to 5.1 surround). I have registry files that can accomplish this task with one click, but I want to assign a keyboard shortcut that will autorun/execute these.
The two registry files are located here:
D:\Windows Speaker Configs\2.1_Stereo_Windows_Speaker_Config.reg
D:\Windows Speaker Configs\5.1_Surround_Windows_Speaker_Config.reg
I want (LEFT) CTRL + (LEFT) SHIFT + 1 to run the 2.1 stereo file. I want (LEFT) CTRL + (LEFT) SHIFT + 2 to run the 5.1 surround file.
I downloaded the Macro Recorder (http://www.autohotkey.com/board/topic/21866-macro-recorder/).
Here is the code from it that will execute either of the two registry files:
Send, {LControl up}{LShift up}
WinActivate, Windows Speaker Configs ahk_class CabinetWClass
WinActivate, Registry Editor ahk_class #32770
WinActivate, Windows Speaker Configs ahk_class CabinetWClass
WinActivate, Registry Editor ahk_class #32770
WinActivate, Windows Speaker Configs ahk_class CabinetWClass
Send, {LCtrl}{LShift}
I am not sure if the above code helps, but any help would be appreciate on how to go about doing this simple task.
Keep in mind whenever you run a registry file, it prompts you with this dialog that has a YES or NO button to click: "Adding information can unintentionally change or delete values and cause components to stop working correctly. If you do not trust the source of this information in myfile.reg, do not add it to the registry."
Obviously I want to click the "YES" button in my scenario.
Thanks in advance!
~ Im2bz2p345 :)