04-08-2014, 07:58 PM
I've learnt a bit more about AHK and there are some errors in my scripts. Firstly
Send {CTRL down} {END down}
will send a space as well as Ctrl+END, so what it needs to be is
Send {CTRL down}{END down}
However, we probably don't need to even send the Ctrl as that's already being pressed, so it will probably be better to use
^Xbutton1::
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
Send, {blind}{End down} ; the control key is already down so is it actually required?
Keywait, XButton2
Send, {blind}{End up}
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
return
for Ctrl+End when pressing Ctrl+MB1
and
!Xbutton1::
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
Send, {blind}{End down} ; the Alt key is already down so is it actually required?
Keywait, XButton1
Send, {blind}{End up}
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
return
for Alt+End when pressing Alt+MB1.
Also bear in mind that MB1 will only send End when the AHK script tells it to, so for example if you're holding Shift (to sprint) and press MB1, it won't send End and thus the radio won't trigger. To fix this, we need to add a mapping for Shift+MB1:
+Xbutton1::
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
Send, {blind}{End down}
Keywait, XButton1
Send, {blind}{End up}
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
which should do the trick.
Send {CTRL down} {END down}
will send a space as well as Ctrl+END, so what it needs to be is
Send {CTRL down}{END down}
However, we probably don't need to even send the Ctrl as that's already being pressed, so it will probably be better to use
^Xbutton1::
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
Send, {blind}{End down} ; the control key is already down so is it actually required?
Keywait, XButton2
Send, {blind}{End up}
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
return
for Ctrl+End when pressing Ctrl+MB1
and
!Xbutton1::
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
Send, {blind}{End down} ; the Alt key is already down so is it actually required?
Keywait, XButton1
Send, {blind}{End up}
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
return
for Alt+End when pressing Alt+MB1.
Also bear in mind that MB1 will only send End when the AHK script tells it to, so for example if you're holding Shift (to sprint) and press MB1, it won't send End and thus the radio won't trigger. To fix this, we need to add a mapping for Shift+MB1:
+Xbutton1::
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
Send, {blind}{End down}
Keywait, XButton1
Send, {blind}{End up}
VA_SetMasterMute(!VA_GetMasterMute("capture"), "capture")
which should do the trick.