This worked in 1987, no reason to get all fancy with sending in time and so forth, and it is a case where the wait command is perfectly at home:
on mouseDown put the ticks into tStart wait until the mouse is up if the ticks - tStart < 20 then answer "Short Press" else answer "Long Press" end mouseDown Craig Newman -----Original Message----- From: Gerry Orkin <gerry.or...@gmail.com> To: How to use LiveCode <use-livecode@lists.runrev.com> Sent: Thu, Feb 21, 2013 8:20 pm Subject: Re: timing mouseDown Use mousestilldown? Gerry On 22/02/2013, at 10:37 AM, Nicolas Cueto <nicon...@gmail.com> wrote: > Hello. > > On mobile apps, pressing a button-icon can have two results, depending on > how long the button is held down. > > I recollect having scripted this effect on LC in the past, using mouseDown > and "send" and "cancel message". But I also recollect problems with the > message queue. > > So, what would an ideal LC script be for this, with both desktop and mobile > platforms in mind? > > Thank you. > > -- > Nicolas Cueto > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode