General

Long-press button function

Started by catmann05 on .

Sign in or create an account to join the conversation.

3 posts

Topic starter
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.
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