To circumvent this, I tried to bind another command to F: mainly to toggle off all the spamming and sleep, push some keys in succession, and then toggle back on the spam. For all intents and purposes it works. However, now when I click the toggle button, it sometimes triggers the actions scripted to F.
So my question is: how do I make the two actions (XButton1 and F) to where they don't interfere with each other but F still is able to toggle Xbutton1 off and back on?
OR
Is there another delay command other than sleep which doesn't interfere with mouseclicks or keypresses when it is being spammed?
A solution to the former is actually more preferred.
Code: Select all
toggle = 0
#MaxThreadsPerHotkey 5
XButton1::
Toggle := !Toggle
While Toggle{
Send, {r}
sleep 200
If !Toggle
Break
}
f::
Send, {XButton1}
sleep 25
Send {Shift down}{LButton down}
KeyWait, f
Send {Shift up}{LButton up}
Send, {RButton}
Send, {Xbutton1}
return