Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom MouseMovement Example
#5
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
Reply


Messages In This Thread
Custom MouseMovement Example - by SMcNeill - 02-25-2024, 05:37 PM
RE: Custom MouseMovement Example - by NakedApe - 02-26-2024, 01:18 AM
RE: Custom MouseMovement Example - by SMcNeill - 02-26-2024, 03:29 AM
RE: Custom MouseMovement Example - by SMcNeill - 02-26-2024, 03:45 AM
RE: Custom MouseMovement Example - by NakedApe - 02-26-2024, 06:00 AM
RE: Custom MouseMovement Example - by NakedApe - 02-26-2024, 05:35 PM
RE: Custom MouseMovement Example - by SMcNeill - 02-27-2024, 07:15 AM
RE: Custom MouseMovement Example - by GareBear - 02-27-2024, 01:06 PM
RE: Custom MouseMovement Example - by SMcNeill - 02-27-2024, 01:28 PM
RE: Custom MouseMovement Example - by SMcNeill - 02-27-2024, 01:47 PM
RE: Custom MouseMovement Example - by NakedApe - 02-27-2024, 04:59 PM
RE: Custom MouseMovement Example - by SMcNeill - 02-27-2024, 05:06 PM
RE: Custom MouseMovement Example - by MasterGy - 02-27-2024, 05:18 PM
RE: Custom MouseMovement Example - by NakedApe - 02-27-2024, 07:17 PM
RE: Custom MouseMovement Example - by MasterGy - 02-27-2024, 08:53 PM
RE: Custom MouseMovement Example - by SMcNeill - 02-27-2024, 08:58 PM
RE: Custom MouseMovement Example - by MasterGy - 02-27-2024, 09:07 PM
RE: Custom MouseMovement Example - by NakedApe - 02-28-2024, 02:40 AM



Users browsing this thread: 2 Guest(s)