why does lock screen doesn't locks the screen?

Nonsanity form at nonsanity.com
Fri Jul 1 11:29:04 EDT 2011


"lock screen" only locks the window contents, not the whole screen (despite
the name) and never the cursor. The cursor belongs to the user and lives
above the screen. But you can "lock cursor" to keep in in the shape that you
want.

I can't get "set cursor to none" to hide the cursor here, so there may be
something wrong with that feature. What you can do instead is make a 16x16
all-alpha png file and import that into the stack. Then you can set the
cursor to that image's id and then lock the cursor and do your movements.
When the handler exits, the lock will be released, but it's always better to
put an "unlock cursor" (or screen) because these commands stack. (Five locks
takes five unlocks.)

I made such an image and tested it, and it worked. I'd give you a link to
the image, but Dropbox is being flaky right now. Wait... I'll put it on
another server:

http://nonsanity.com/x/invisible16x16.png

And here's my script. I made sure the points I picked were over different
objects, like a field, to make sure the cursor wouldn't change as it would
normally.

on mouseUp
   set the cursor to 1007
   lock cursor
   set the cursor to 1007
   wait 50
   repeat with a = 1 to 4
      set the screenmouseloc to word a of "202,398 290,270 168,222 363,594"
      wait 50
   end repeat
end mouseUp

Hope that helps.

 ~ Chris Innanen
 ~ Nonsanity


On Fri, Jul 1, 2011 at 4:14 AM, Tiemo Hollmann TB <toolbook at kestner.de>wrote:

> Hello,
>
> In a function I set the screenMouseLoc to four different locations on an
> image to get the mousecolor of these four locations.
>
> I have set the screen lock at the beginning of the function, but the cursor
> is flickering at all four locations, so obviously the screen is redrawn
> everytime I set the mouse at a new location  though the screenloc is true.
>
> What can I do to not see the mouse (and perhaps speed up the function), and
> why does the lock screen doesn't work in this case?
>
> Thanks
>
> Tiemo
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list