Page 1 of 1

Long-press button function

Posted: 09 Nov 2015 16:46
by catmann05
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.

Re: Long-press button function

Posted: 09 Nov 2015 20:40
by MrCorba
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

Re: Long-press button function

Posted: 10 Nov 2015 02:59
by catmann05
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