Hello
I'm a newbie and I couldn't find code for this
I want to do this:
If MButton is being held down, do "SoundSet, 0,, Mute, 2"
and if MButton is released, do "SoundSet, 1,, Mute, 2"
How can I do that?
Thanks in advance
[Solved] Sending 2 different action when a key is pressed + when it’s released Topic is solved
[Solved] Sending 2 different action when a key is pressed + when it’s released
Last edited by Tom1 on 17 Sep 2018, 20:25, edited 2 times in total.
Re: Sending an action when a key is pressed + when a key is released
MButton can be finicky, but the code should be
If it doesn't work as is, try a different key instead of MButton, just to test it. Then we can come up with a different solution.
Code: Select all
MButton down::SoundSet, 0,, Mute, 2
MButton up::SoundSet, 1,, Mute, 2
If it doesn't work as is, try a different key instead of MButton, just to test it. Then we can come up with a different solution.
Re: Sending an action when a key is pressed + when a key is released
Thanks for your reply! Unfortunately your code doesn't work, even with a different key. "Error: Invalid hotkey."Exaskryz wrote:MButton can be finicky, but the code should be
Code: Select all
MButton down::SoundSet, 0,, Mute, 2 MButton up::SoundSet, 1,, Mute, 2
If it doesn't work as is, try a different key instead of MButton, just to test it. Then we can come up with a different solution.
Re: Sending an action when a key is pressed + when a key is released Topic is solved
Bah, I forgot down is not a modifier for hotkeys.
Code: Select all
MButton::SoundSet, 0,, Mute, 2
MButton up::SoundSet, 1,, Mute, 2
Re: Sending an action when a key is pressed + when a key is released
It works! Thank you very much, Exaskryz!Exaskryz wrote:Bah, I forgot down is not a modifier for hotkeys.
Code: Select all
MButton::SoundSet, 0,, Mute, 2 MButton up::SoundSet, 1,, Mute, 2