Inhibit mouse Events possible?
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu Jul 3 13:45:24 EDT 2014
Hi Bill,
One way to do this:
local lBusy,lSecs
on mouseUp
if lBusy is true then
beep
exit mouseUp
else if lBusy is not true then
put true into lBusy
put the seconds into lSecs
repeat forever with messages
// some long task here
if the seconds - lSecs > 5 then exit repeat
wait 0 millisecs with messages
end repeat
put false into lBusy
end if
end mouseUp
This script doesn't allow running the script again, as long as it hasn't
finished. If you have multiple controls that should not be used while
the script runs, you can disable the other controls or use a global
variable and check the global variable in the other scripts.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Installer Maker for LiveCode:
http://qery.us/468
Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi
LiveCode on Facebook:
https://www.facebook.com/groups/runrev/
On 7/3/2014 19:32, William Prothero wrote:
> Folks:
>
> Is it possible to inhibit mouse events? Some of the operations that are initiated by a mouse click require a bit of time and I don’t want the user to be able to click around until each operation is finished. One approach would be to put a transparent rectangle over the stack and not pass events, but I wonder if there is a more direct way.
>
> Thanks,
> Bill
>
> William A. Prothero, Ph.D.
> University of California, Santa Barbara Dept. of Earth Sciences (Emeritus)
> Santa Barbara, CA. 93105
> http://es.earthednet.org/
>
>
>
> _______________________________________________
> 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