youre misusing the timers and loops here. u tell a timer to run once, very nearly immediately, then enter an infinite loop right after. just.. dont do this.
what u need is a timer thats gonna tick every 80ms and run the send command once. To set it up, u first define the function that u want ur timers to carry out. Then make a bound function object out of it, storing it into a variable. U pass arguments to the function using the Bind() method. Finally u call the timer and point it to the bound function object that u had created.
Code: Select all
send8 := Func("sendKey").Bind(8)
send9 := Func("sendKey").Bind(9)
XButton1::SetTimer % send8, % (timerToggle1 := !timerToggle1) ? "80" : "Off"
XButton2::SetTimer % send9, % (timerToggle2 := !timerToggle2) ? "80" : "Off"
Send % key