02-02-2023, 02:09 PM
(02-02-2023, 11:11 AM)bplus Wrote:Quote:Code: (Select All)'mouse sub from wiki with added check for mouse(2)
Sub Mouser (x, y, b)
mi = _MouseInput
b = _MouseButton(1)
If _MouseButton(2) = -1 Then b = -2
x = _MouseX
y = _MouseY
End Sub
I am curious where in wiki this is? Might need to be fixed.
Your Mouser routine seems to work only because it's being used in a loop with _Limit 500
If you try that routine in a _Limit 60 or less loop you will want to change Mouser to:
Code: (Select All)Sub Mouser (x, y, b)
While _MouseInput: Wend
b = _MouseButton(1)
If _MouseButton(2) = -1 Then b = -2
x = _MouseX
y = _MouseY
End Sub
Example 4 under _mousebutton on the wiki has this subroutine:
Code: (Select All)
SUB Mouser (x, y, b)
mi = _MOUSEINPUT
b = _MOUSEBUTTON(1)
x = _MOUSEX
y = _MOUSEY
END SUB