Long-press button function

Discuss Lemur and share techniques.
Post Reply
catmann05
Newbie
Posts:24
Joined:29 Oct 2012 14:10
Long-press button function

Post by catmann05 » 09 Nov 2015 16:46

Does anyone know how to implement a button that if pressed normally it executes a function (default) but if one keeps pressing it for a certain time it executes another function?

Maybe this has already been discussed, but I do not know how this dual functionality would be called (so I could run a search).

Thanks in advance.

MrCorba
Regular
Posts:143
Joined:02 Sep 2013 20:17
Location:Netherlands

Re: Long-press button function

Post by MrCorba » 09 Nov 2015 20:40

This should do the trick. The delayTime expression is het number of seconds between the first and second function.

All the scripts have comments to explain what's being done but ask any questions necessary;)

Cheers!
MrCorba
Attachments
SecondFunction.jzml
(7.93KiB)Downloaded 126 times
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba

catmann05
Newbie
Posts:24
Joined:29 Oct 2012 14:10

Re: Long-press button function

Post by catmann05 » 10 Nov 2015 02:59

thank you very much! it is great.

catman
MrCorba wrote:This should do the trick. The delayTime expression is het number of seconds between the first and second function.

All the scripts have comments to explain what's being done but ask any questions necessary;)

Cheers!
MrCorba

Post Reply