Button use while script is running

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Jeanne DeVoto
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10
Joined: Wed Apr 12, 2006 12:23 am
Contact:

Re: Button use while script is running

Post by Jeanne DeVoto » Wed Nov 16, 2016 12:51 am

jacque wrote:I will mention that unless the mouse is down at the exact moment that line of script runs, it will fail. LC doesn't buffer mouse states.
But it does buffer the mouseClick state! (MOO-ha-ha-ha-ha.)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Button use while script is running

Post by jacque » Wed Nov 16, 2016 5:52 pm

Jeanne DeVoto wrote:
jacque wrote:I will mention that unless the mouse is down at the exact moment that line of script runs, it will fail. LC doesn't buffer mouse states.
But it does buffer the mouseClick state! (MOO-ha-ha-ha-ha.)
I should have known you'd have that in your memory banks. :-)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9752
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Button use while script is running

Post by dunbarx » Wed Nov 16, 2016 6:02 pm

Now, girls...

But Jeanne makes a point. The old, old way to emulate a double click back in the day was:

Code: Select all

on mouseUp
wait 30
if the mouseClick then...
...
So the state of the mouse was queued even during a blocking interval. I am not going back to test using "if the mouseClick" instead of "if the mouse is down", but I bet a boxed floppy disc set of HC 2.1 it would work just fine.

Craig

Post Reply

Return to “Talking LiveCode”