action after user inactivity

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.
Locked
User avatar
tglabicki
Posts: 3
Joined: Fri Jul 27, 2012 10:58 pm

action after user inactivity

Post by tglabicki » Fri Jul 27, 2012 11:09 pm

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 :)

User avatar
tglabicki
Posts: 3
Joined: Fri Jul 27, 2012 10:58 pm

action after user inactivity

Post by tglabicki » Fri Jul 27, 2012 11:09 pm

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 :)

User avatar
jvierra
Posts: 11132
Joined: Tue May 22, 2007 9:57 am
Contact:

action after user inactivity

Post by jvierra » Sat Jul 28, 2012 2:17 am

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.



User avatar
jvierra
Posts: 11132
Joined: Tue May 22, 2007 9:57 am
Contact:

action after user inactivity

Post by jvierra » Sat Jul 28, 2012 5:03 am

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

User avatar
tglabicki
Posts: 3
Joined: Fri Jul 27, 2012 10:58 pm

action after user inactivity

Post by tglabicki » Sat Jul 28, 2012 8:05 am

Works perfect Thanks :D

Locked