send "mouseUp" & real click

Dave Cragg dcragg at lacscentre.co.uk
Fri Feb 17 06:59:05 EST 2006


On 17 Feb 2006, at 11:36, sims wrote:

> I have an OS X app which uses an external, it collects data and all  
> runs fine.
>
> If that computer is set to 'sleep', upon wakeup the external is not  
> collecting that data.
>
> If I then physically use the mouse to click a btn to stop & restart  
> that external it works fine (external collects data properly)
>
> If I use a  send "mouseUp" to that btn it does not work the same as  
> when I physically click with the mouse
> (the external does not collect data)
>
> I have tried all sorts of 'send in X seconds' and still no happiness.
>
> Is it possible that sending a 'mouseUp' to a btn is different than  
> an actual mouse click?

It's different in the sense that a click will generate both mouseDown  
and mouseUp events. So if your mouseUp depended on anything that be  
set by mouseDown, Klaus's idea is probably better.

Also, manual clicking will ensure that the stack with the button is  
the defaultstack and possibly the topstack. Depending on what action  
your mouseUp handler takes, could that be a factor?

Cheers
Dave



More information about the Use-livecode mailing list