Creating a timer

edited April 2018 in Library Questions

Hi, I am in need of some assistance. I'd like to write code that will execute when you click the mouse, and I want the action to run for a maximum of four seconds. If the mouse is still pressed for longer than four seconds, the action will stop. However, I want the action to stop immediately once the mouse is released if the mouse is released after say for example two or three seconds. Also, I'd want this to be repeatable, so that you can do the action as many times as you want. Thank you.

Answers

Sign In or Register to comment.