Polling the mouse

Scott Raney raney at metacard.com
Fri Feb 22 15:25:01 EST 2002


On Fri, 22 Feb 2002 "J. Scott Saults" <attgenmail at moago.org> wrote:
> 
> At 10:51 PM -0500 2/21/02, Scott Raney <raney at metacard.com> wrote:
> >I didn't check SC, but HC definitely does not work the way you say.  Try it
> >yourself and see.  Put the following script in a button, then click to
> >run it and click again before the repeats finish (you may need to
> >adjust the count depending on the speed of your system):
> >on mouseUp
> >   get 0
> >   repeat for 10000 times
> >     add 1 to it
> >   end repeat
> >   put the mouse
> >end mouseUp
> >
> >It's compatibility at that level that's hard to do, convenient as it
> >might be for some things.
> >   Regards,
>      Scott
> 
> Evidently, I misunderstood your  original post.  I  afraid I don't 
> get the point of this post or script, either. I'm sorry to be so 
> dense.  It seems to me, in HC, that your script calls the mouse 
> function once, after the repeat loop has finished its 10000 
> iterations. If the mouse button is down when that occurs, then "down" 
> appears  in the message box.  If the mouse button is up at that 
> moment,  then  "up" appears  in the message box. If I press the mouse 
> while the loop is still being executed, but then release it before 
> the loop is finished, then "up" appears in the message box.

But did you actually try this?  It *doesn't* work that way in either
MC or HC now.  If you don't see it, try increasing the loop count (you
may need to at one zero for HC, and about 3 in MC/RR ;-)

My real question is, given that you're confused about this, how many
other people must be, and if a lot, does this behavior really need to
be preserved?
  Regards,
    Scott

> J. Scott Saults

********************************************************
Scott Raney  raney at metacard.com  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...




More information about the use-livecode mailing list