04-12-2011 08:05 AM
Hi Everyone.
I am doing project on gesture recognition with touchpad. I need to find out the total time of completion of gesture on touchpad. For that I need to calculate total time of cursor movement on laptop touchpad. When cursor starts moving, that time I need to capture time and when it stops also. I need to find out difference between the start time and stop time. Please help me to do this task. Presently I am trying with event structure and timed structure but I am getting only present time only. I tried with counter but unable to get the difference.
04-12-2011 09:31 AM
It sounds like you need the time the mouse is down. Is that correct? This simple VI will give you the time in ms that the mouse was down. Is something like this what you are looking for?
04-12-2011 09:31 AM - edited 04-12-2011 09:37 AM
Edited: removed because duplicate post
04-12-2011 09:36 AM - edited 04-12-2011 09:37 AM
Sorry... Again,
Edited: removed because duplicate post
04-13-2011 02:01 AM
Thanks you for giving reply. In your program I am getting time when clicking the mouse but I need to calculate time when mouse start moving. I need to find out the total time of mouse movement for that I need to know start time and stop time. If I get these two times then I can do the difference then I will get the total time of mouse movement.
04-13-2011 03:45 AM
Create an event structure which looks for the mouse move event.
This will give you the time that a mouse move starts. If you use the timeout case (i.e. no mouse movements happening) you can compare the time of mouse move starting (move event) with the time that mouse moves stop (timeout event). Subtract one from the other and you have your answer.
Ian
04-13-2011 09:28 AM
I missed the mouse move event when I saw this earlier, and for some reason I thought the first attempt would give you what you wanted.
Here is a different VI. It uses mouse move event with some logic that remembers the first mouse move event. Otherwise, you won't get the correct time.
04-13-2011 11:06 PM
Thank you very much. I will try with your vi.