Can a mouseclick simultaneously send a message as it ends a "repeat until the mouseclick" loop?

Jan Schenkel janschenkel at yahoo.com
Fri Nov 22 01:31:01 EST 2002


--- Mark Swindell <mdswindell at charter.net> wrote:
> If I am in a (repeat until the mouseclick) loop, is
> it possible to have the
> same mouseclick that ends the repeat also send a
> mouseUp event to another
> button?  I have a repeating slide show that I'd like
> the user to be able to
> change simply by clicking on a new button, not
> clicking once to stop the
> slideshow, and again to start the new one.  Another
> angle on accomplishing
> this?
> 
> Thanks,
> Mark 
> 

Hi Mark,

Even though your 'repeat until the mouseClick' is
considered a 'no-no' because it gobbles up all the CPU
time, you should have a look at the 'mouseControl'
definition in the Transcript documentation.
Basically, it gives you the type and the number of the
control the mouse pointer is currently hovering over.
So your loop should end something like this:

  repeat until the mouseClick
    -- do your slideshow here
  end repeat
  get the mouseControl
  if it is not empty then send "mouseUp" to it

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the use-livecode mailing list