Repeats and mouse events and documentation

David Vaughan drvaughan55 at mac.com
Tue Feb 12 17:02:01 CST 2002


Charles

As someone posted recently, it really helps if you post the specific 
purpose of your code as well as the fragment. That saves effort on our 
part trying to distinguish coding intentions from coding mistakes, 
leaving us more time to be helpful. Is it your intention that
  - one click on the mouse does nothing (from the user view)
- two clicks within fifteen seconds generates a reward message, which 
disappears on mouseUp
- no other events are accepted after the first mouseClick until timeout 
or a second click on the same button

thanks
David

On Wednesday, February 13, 2002, at 03:23 , Charles Silverman wrote:

> Hi,
>    This bit of code doesn't work right (though in Supercard it's fine) 
> I've
> seen recommendations for using "send" but don't I open up to other
> inadvertent/undesirable user events or processes happening. I need to 
> keep
> the user focused within a specific loop. Am I missing something?
>
> Here's the kind of code I'm talking about. In this example the script 
> goes
> into a btn and there's a single fld . Warning... This code has crashed 
> Rev
> and frozen my computer (Mac Pismo PB).
>
> The larger purpose of this code is for the creation of single switch
> software for kids who can't manipulate a keyboard but can press and 
> release
> switches. I've been doing this stuff for years in SuperCard.  I need to
> carefully scrutinize switch (mouse btn in this case) activity to 
> accommodate
> for a variety of behaviors. The code strategy below is what I 
> traditionally
> use for hiliting a series of objects (btns, flds, text within field, 
> etc.)
> one at a time, for a duration of time, and as well, using the amount of 
> time
> involved in mouse downs and ups to create multiple signal possibilities.
>
> Any thoughts on this appreciated.
>
> -Charles Silverman
>
>
> --
> On mousedown
>  get flushevents("mousedown")
> End mousedown
>
> On mouseup
>  Put the seconds into tStartHere
>  Repeat
>   put the seconds - tStartHere into tTimeNow
>   if tTimeNow > 15 then exit repeat
>   if the mouse is down then
>       put "You got It" into fld 1
>       beep
>       wait until the mouse is up
>       exit repeat
>    end if
>  end Repeat
> Put "" into fld 1
> End mouseup
> --
>
>
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list