Avoiding mouse polls

Ken Norris (dialup) pixelbird at interisland.net
Sat Dec 14 13:20:01 EST 2002

Date: Fri, 13 Dec 2002 23:25:32 -0600
From: curry <curry at kagi.com>
Subject: Re: Avoiding mouse polls

> Yeah--if you have it full screen, then you just need a message to the
> card at repeating intervals that changes the hilited object, and
> mouseup or mousedown in the card that ignores the target and just
> checks by variable which object is currently hilited.
> For example, pseudo code, not word for word and not tested:
> global theobj,whichobj
> on dohilite
> add 1 to whichobj
> if whichobj > numObjs then put 1 into whichobj
> set hilite of control theobj to false
> put item which of
> "abutton,another,agraphic,afield,onemore,somethingelse" into theobj
> set hilite of control theobj to true
> send dohilite to me in howevermany seconds
> end
> on mousedown
> answer "oh man, they clicked for" && theobj
> send theyClicked to control theobj
> end
Thanks Curry,

I think this is sort of on the right track. I think you expect the code to
be in a loop, right? So it detects a mouse message while it's running via
the send command, right? No, that won't quite work either.

Ken N.

More information about the Use-livecode mailing list