How can I make the application close automatically after five minutes without touching the screen

How can I make the application close automatically after five minutes without touching the screen

@Still-learning
Sorry, but you did not understand my point. What I want to do is when the screen is not touched for 5 consecutive minutes, the application closes, and if the user touches the screen, the application continues to work fine

Then just add blocks so that if the screen is touched the clock stops running.

@deanart2012
Can you point me to which blocks I used to succeed in this process?

Using ComponentsTools extension, when any of its registered components is touched, reset the timer by disabling it and enabling it again, it will of course start from 0 ms:

blocks

And when it reaches 300000 ms without being reset, the application is closed:

blocks (1)

Alternative solution without ComponentsTools is to set an event of “.Click” for each component but it needs the component to be clickable and that’s a very long process so just use this procedure to register a list of components at once at screen initialization:

blocks (2)

Thanks to @Mohamed_Tamer for ComponentsTools!

1 Like