So I am trying to build a larger script that is basically a togglable loop of actions. For some reason toggling it on and off doesn't work so I tried do some research and first get it going with smaller scripts:
Code: Select all
#MaxThreadsPerHotkey 2
F5::
Toggle := !Toggle
loop
{
If not Toggle
break
tooltip,% A_Index
}
return
This code works. It lets me toggle on and off and I get shown the tooltip. (I found this example in an older tutorial on how to do toggleable loops). So I tried to make a slight variation on this:
Code: Select all
#MaxThreadsPerHotkey 2
F5::
Toggle := !Toggle
loop
{
If not Toggle
break
tooltip,% A_Index
send {q}
}
return
This code already does not toggle anymore it just keeps ticking up and sending q.
I also tried a third script that also didn't toggle for some reason:
Code: Select all
#MaxThreadsPerHotkey 2
F5::
Toggle := !Toggle
loop
{
If not Toggle
break
send {q}
}
return
I really am lost here because for all I understand both of these scripts should allow toggle via F5. Can anyone shed light on what my issue may be here?