Page 1 of 1

action after user inactivity

Posted: Fri Jul 27, 2012 11:09 pm
by tglabicki
Hiwhether it is possible to show or hide a DIV using VBS in HTA application when it detects that the user does not do anything in the application by, eg. 5 minutesThanks for quick replay :)

action after user inactivity

Posted: Fri Jul 27, 2012 11:09 pm
by tglabicki
Hiwhether it is possible to show or hide a DIV using VBS in HTA application when it detects that the user does not do anything in the application by, eg. 5 minutesThanks for quick replay :)

action after user inactivity

Posted: Sat Jul 28, 2012 2:17 am
by jvierra
Yes but you have to define "do" and "does not do".

The baseline method is to trap on all clicks and keystrokes and clear a flag. Set a timer for the timeout, when the timer ticks and if the flag is set hide or unhide your div.

1. set trap on all events and keystrokes a document level that clears flag.
2. set timer - set flag
3. timer ticks and flag is checked. if flag still set then perform action.



action after user inactivity

Posted: Sat Jul 28, 2012 5:03 am
by jvierra
On body object place onclick="mysub"

In window load routine start a timer event and set its function. aet glocal flag variable to True.

Once you see how it works for the onclick then you can catch the onkeypressevent (?) and send it to the same function.

jvierra2012-07-28 12:05:08

action after user inactivity

Posted: Sat Jul 28, 2012 8:05 am
by tglabicki
Works perfect Thanks :D