08-29-2007 08:12 AM
08-29-2007 08:20 AM
why not simply use a "elapsed time" in the timeout event.
this might require some tracking of time of last event, but should be fairly simple:
on mouse move, record time and turn button on.
in timout, check every 50ms the time elapsed versus the previously recorded one. if above the time set by you, then a case selector becomes true in which you set the property of the button to false.
is it what you asking for? could you post the vi?
08-29-2007 08:20 AM
08-29-2007 08:36 AM
08-29-2007 09:13 AM
I'm not sure exactly what you want to do, but the two event structures in the same loop are definitely your problem.
I think this might actually be answered by one of the examples in a nugget I started writing a while back.
08-30-2007 12:03 PM
08-30-2007 12:31 PM
08-30-2007 05:05 PM
I can think of two simple options:
I'm guessing you will actually have to use #2, because #1 will only be useful when the VI has focus and I assume most of your work will be done in other programs. ![]()
You shouldn't be concerned about polling. If you do it once every second or two, you should be fine.
08-31-2007 08:14 AM
08-31-2007 08:21 AM
Did you look at my previous example?
You really should learn how shift registers work.
Here's another example, based on your recent one.