Ah I see, with _Limit 60 in loop it behaves quite differently and THEN it does make a difference between
10 If _MouseInput then Goto 10 ' this short circuits hitting _LIMIT in the other part or Loop and slowing things down
and
10 If Not _MouseInput Then GoTo 10
Fixed for _Limit 60
Thanks Steve
10 If _MouseInput then Goto 10 ' this short circuits hitting _LIMIT in the other part or Loop and slowing things down
and
10 If Not _MouseInput Then GoTo 10
Fixed for _Limit 60
Code: (Select All)
_Title "Click to draw paths from one click to next" 'b+ 2023-01-03
Do
10 If _MouseInput Then GoTo 10
mx = _MouseX: my = _MouseY: mb = _MouseButton(1)
If mb Then
If lastx <> 0 And lasty <> 0 Then
Locate my, mx: Print "X";
If mx > lastx Then
While lastx < mx
lastx = lastx + 1
Locate lasty, lastx: Print "X";
Wend
Else
While lastx > mx
lastx = lastx - 1
Locate lasty, lastx: Print "X";
Wend
End If
If my > lasty Then
While lasty < my
lasty = lasty + 1
Locate lasty, lastx: Print "X";
Wend
Else
While lasty > my
lasty = lasty - 1
Locate lasty, lastx: Print "X";
Wend
End If
End If
lastx = mx: lasty = my
End If
_Limit 60 ' <<< to work with limit you need to run _MouseInput in small tight loop
Loop
Thanks Steve
b = b + ...