Kay.
Any single command to unlock the screen will only undo one of the number of locks already set. You have to do the whole thing: repeat until the lockScreen = "false" unlock screen end repeat try this in a button: on mouseup lock screen lock screen lock screen repeat until the mouseClick put random(99) end repeat if the lockscreen = "true" then unlock screen answer the lockscreen end mouseup You get "true" Craig -----Original Message----- From: Kay C Lan <lan.kc.macm...@gmail.com> To: How to use LiveCode <use-livecode@lists.runrev.com> Sent: Fri, Sep 21, 2012 11:43 pm Subject: Re: lock/unlock screen On Fri, Sep 21, 2012 at 5:47 AM, Bob Sneidar <b...@twft.com> wrote: > Face it Richmond. It's you and me against the world. ;-) If you can't sleep at night because you're worried about multiple lock screen, or keeping track of pairs, why not: if the lockScreen is false then lock screen If you only ever use this, when you absolutely need the screen to be locked, then the count will only ever be 1. For those instances where you absolutely need the screen to be unlocked: if the lockScreen is true then unlock screen Then you don't have to bother about keeping track of pairs and can rest easy at nights knowing that if left to the engine it only has to unlock once when it goes idle - rather than having to wait a millisecond longer if you had dozens piled up. _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode