Script for executable idle timer

Devin Asay devin_asay at byu.edu
Tue Nov 12 16:39:57 EST 2013


On Nov 12, 2013, at 2:23 PM, Magicgate Software - Skip Kimpel wrote:

> I have an executable that needs to monitor if it has been sitting idle for
> an hour.  If so, it needs to quit.
> 
> What is a quick, un-intrusive way of doing this?  Maybe even display an
> answer dialog box to continue the "session" and giving them 10 seconds to
> respond, after which it would shut the executable down as previously
> described.
> 
> Quite a bit of what I finding in the forums seems to be mobile based but no
> clear cut answers when it comes to standalone executable.

Skip,

I have used a front script that with some key message handlers to do this in the past. Usually mouseDown, rawKeyDown, and maybe mouseMove are sufficient. (Make sure to pass them, of course.)

The problem with a dialog box is that there is no way to dismiss is in a script as far as I know. But you could easily roll your own notification dialog to get around this.

HTH

Devin


Devin Asay
Learn to code with LiveCode University
http://university.livecode.com





More information about the use-livecode mailing list