Best way to set up an idle timer

Dar Scott dsc at swcp.com
Thu Aug 14 17:11:00 EDT 2003


On Thursday, August 14, 2003, at 03:46 PM, Devin Asay wrote:

> The problem with this approach of course is there is no way to reset 
> the startSeconds unless the timeOut handler runs. I don't want to have 
> to trap every single mouse and keyboard event to reset startSeconds.

Perhaps you can put a few keyboard and mouse handlers in a single front 
script.  Each of these would call an activity handler and then pass.  
The activity handler would then reset the timer and do what else is 
needed.

(BTW, since inactivity is not a precise thing, you might create a send 
cycle that executes every couple seconds to check the timer instead of 
using idle.  I also have another method as an example in my _Message 
Machinery Primer_, which I'm going to go work on right now.)

Dar Scott




More information about the use-livecode mailing list