Locating the mouse

Klaus major-k klaus at major-k.de
Sun May 6 15:31:17 EDT 2018


Hi Richmond,

> Am 06.05.2018 um 21:26 schrieb Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com>:
> 
> Yer: I know: mouseLoc
> 
> BUT, that only returns the loaction of the mouse relative to the top-left of a stack.
> Let us suppose one has a stack measuring 100 by 100 pixels at the centre of one's monitor . . .
> And one wants to know the position of the mouse in terms of the monitor rather than the stack . . .
> So that one can determine IF the mouse is 100 pixels away from the left-hand side of the stack, or 200 pixels.
> This would, of necessity, have to be in a stackScript or a cardScript and NOT involve any mouseClicks as that
> would take focus away from the stack.

you are looking for -> the ScreenMouseLoc
Maybe monitor this property in a "mousemove" handler in the card or stack script...

> Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the Use-livecode mailing list