02-26-2024, 06:00 AM
I gave it a shot. The numbers don't change, though I do see the pointer stuck at 0, 0. You put that junkX/Y = _MOUSEX/Y inside the WHILE/WEND, but no info is transferred from those variables to the rest of your sub as written. I do get basic mouse x and y values and pointer movement from the below, but nothing from your sub...
Code: (Select All)
DIM SHARED AS LONG MouseX, MouseY
SCREEN _NEWIMAGE(800, 600, 32)
_SCREENMOVE _MIDDLE
DO
CLS
Mouse
TMMX = TMMX + MouseMoveX: TMMY = TMMY + MouseMoveY
PRINT "Mouse x:"; MouseX
PRINT "Mouse y:"; MouseY
PRINT "MouseMoveX:"; MouseMoveX
PRINT "MouseMoveY:"; MouseMoveY
PRINT "Total MouseMoveX:"; TMMX
PRINT "TOtal MouseMoveY:"; TMMY
_LIMIT 30
_PRINTSTRING (MouseX, MouseY), CHR$(24)
_DISPLAY
LOOP UNTIL _MOUSEBUTTON(2)
SYSTEM
SUB Mouse
WHILE _MOUSEINPUT
MouseX = _MOUSEX: MouseY = _MOUSEY
WEND '
_MOUSEHIDE
END SUB