Code: Select all
~*Rbutton::
GetkeyState, Shift, Shift
if shift = D
Send, {ShiftUp}
else if shift = U
Send, {ShiftDown}
Return,
The idea is when I click on the RMB (toggle to ADS in video game) I want SHIFT (hold breath in video game) to be activated at the same time (TOGGLE, not HOLD)
When I press RMB after, it cancels the action (SHIFT button) and I like it, but I also want to cancel action by pressing "R" button.
So is there any way to cancel the script (SHIFT) by pressing "R" button aswell?
Like: Press RMB once (script runs), Press RMB or R (script cancels)
By cancel, I mean cancel action, not suspend.
I had an idea to make something like this (but the first script would do fine, if you guys could just adjust it for me):
Code: Select all
*RButton::Shift
#If GetKeyState("RButton")
~r:: (that cancels the action if R is pressed)
*RButton Up::???? (idk what to write here)
#If
But it doesn't work, I guess that I'm just too stupid... Help me out please :/
Thank you!