At 6:07 AM -0800 2/2/01, Richard Gaskin wrote:
>The mouseMove message is exactly what I'm looking for as a solution to
>something I'm working on, but with one drawback for my needs:  it is only
>sent when the mouse moves inside of a MetaCard window; once outside, the
>message is no longer sent.
>
>Any know a native MetaTalk way to trap mouse movement anywhere on the
>screen, even outside of MC windows, so long as MC is in front?

Using "send" might work. For example, in a card script:

local sHaveFocus

on mouseMove x,y
   put x & "," & y
end mouseMove

on mouseLeave
   put true into sHaveFocus
   send "exMouseMove"  to me in 10 milliseconds
end mouseLeave

on exMouseMove
   put the mouseLoc into tPoint
   if (not within(me, tPoint)) and sHaveFocus  then
     put tPoint
     send "exMouseMove" to me in 10 milliseconds
   end if
end exMouseMove

on suspendStack
   put false into sHaveFocus
end suspendStack

If this doesn't do what you want, I'm sure some variation of "send" 
will do the trick.

BTW, mouseMove does get sent when the mouse is outside the window if 
the mouse is down. It gets sent to the object where the mouseDown 
occurred.

Cheers
Dave Cragg

Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to