LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

quit lv for keyboard inactivity

Solved!
Go to solution

We are required to quit LV application upon keyboard or mouse inactivity after a timeout period. I have looked through the windows api in the quest for a the screensaver handler when the screensaver timesout as a possibility but the get/set screensaver only allows to read or write the screensaver timeout period and if the scrrensaver is active. I need to know when the timeout actually happens. Or any other means.


Thanks a lot,

0 Kudos
Message 1 of 4
(3,943 Views)

The basic event structure has a TIMEOUT event, which will fire if no other event happens for a given interval.

If all your other events fire some other event in this same structure, then the timeout will happen after X mSec of no activity.

Any other event will reset that timer. 

 

Note that you have to have ALL other activity trigger an event in this same structture for this to work.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(3,940 Views)
Solution
Accepted by topic author sgundappa

I figured out a way using the "input device control" vis for keyboard and mouse. Using shift registers, I am able to detect and initialize a counter and timeout when the cumulative time exceeds the inactivity time period required. Thanks for your response anyway.

 (I am aware of the event timeout but the top level vi is very complex in nature and was not designed with events).

0 Kudos
Message 3 of 4
(3,924 Views)

Hi sgundappa,

 

Can you show me how you manage to do that please?

 

post an example please

Message 4 of 4
(3,537 Views)