I wonder if there's something wrong with my code. I try to write a toggle code using F2 to spam ctrl. It does the spam job fairly well but when I press F2 again to toggle it off, it only works occasionally. Wonder if the spamming interfere with my F2 key that would throw it off. Below is the code. Also, could I get a modifier so that the code would run on a separate window on the background?
F2::
Toggle := !Toggle
loop
{ If not Toggle
{
Send, {LCtrl Up}
break
}
Send, {LCtrl Down}
sleep, 200
Send, {LCtrl Up}
}
Return