I'm probably not understanding what you mean, but couldn't you make a mouse function that gets the new data that you can call whenever you need it?
sync on
sync rate 0
type DragBoxType
x1, y1, x2, y2 as integer
endtype
global mX, mY, mZ, mC, DBToggle
global DBox as DragBoxType
make object cube 1,1
do
DragBox()
HUD()
sync
loop
end
function DragBox()
Mouse()
if mC
if DBToggle = 0
DBox.x1 = mX: DBox.y1 = mY: DBToggle = 1
endif
Mouse()
line DBox.x1, DBox.y1, mX, DBox.y1: line DBox.x1, mY, mX, mY: line DBox.x1, DBox.y1, DBox.x1, mY: line mX, DBox.y1, mX, mY
else
DBToggle = 0
endif
endfunction
function HUD()
Mouse()
set cursor 0,0: print "FPS: "; screen fps(): print "Mouse X: "; mX: print "Mouse Y: "; mY: print "Mouse Z: "; mZ: print "Mouse C: "; mC
endfunction
function Mouse()
mX = mousex()
mY = mousey()
mZ = mouseZ()
mC = mouseClick()
endfunction
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.