Setting the cursor
ambassador at fourthworld.com
Tue Jan 3 11:44:38 CST 2012
Jim Hurley wrote:
> Ken's suggestion (using screenMouseLoc) would allow me to take
> control of the cursor. It is odd that there is a command to
> locate the mouse relative to the screen but not the card.
> I wonder whether this, and the notion of exercising "power only
> for good," might not date back to Scott Rainey. He had strong
> feelings about the rights and wrongs of programming.
I think the reasoning with the screenMouseLoc is that, unlike controls,
the mouse is not bound to a single window, but is global in nature.
When obtaining coordinates, those are most useful to do something with
them within the window, hence the local coords. But you can set the
mouse location to anywhere on the display, so global coords seem a more
I you need to translate from global to local coords you can use the
FWIW, I think the doc's note of "You must use this power only for good"
came from Jeanne DeVoto from back when she wrote the original
Dictionary. I could be wrong, but it sounds like her style. I've had
the pleasure of working with her to document a client product for the
last few years, and her passion for usability and keeping the user in
control has been much appreciated.
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
More information about the use-livecode