LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

record and play mouse clicks using LabVIEW

Solved!
Go to solution

I want LabVIEW to  record the my mouse clicks and then play it back. Now the mouse clicks may not be in LabVIEW. Say for example  I am google.com and then I click on maps, then on images and then books. I want labview to record it and play it back as an it open google and click on maps then images and so on. Is this possible with LabVIEW or is there any other NI software that does that.

 

Thanks in advance

 

;lab

0 Kudos
Message 1 of 7
(4,651 Views)
No.
0 Kudos
Message 2 of 7
(4,648 Views)
Well, I suppose you could probably do it with the Windows API, but what would be the point? What you're asking for is a recorder, and there's dozens of programs out there that already do it, so why reinvent the wheel?
0 Kudos
Message 3 of 7
(4,642 Views)

You can do this by using the input VIs to record and making calls into the windows API (SetCursorPos and Mouse_Event) to replay and I know because I've done something similar myself, but as the others said, there are probably other programs you can use for this, so it's not worth spending time on.

 

P.S. No, I can't share the code.


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(4,619 Views)

Aha

Thanks guys!

0 Kudos
Message 5 of 7
(4,596 Views)
Solution
Accepted by topic author lab_boy

Hey Lab,

As mentioned above you can do that using windows library functions. Attached you will find two VIs Record Cursor Position.vi will record the position of the mouse cursor. You will need to modify the Simulate Mouse Clicks.vi in order to playback the clicks. I hope this helps.

 

Cheers

NI-khil

Download All
Message 6 of 7
(4,565 Views)

Wow, That's exactly what I wanted ! !
Thanks

 

lab

0 Kudos
Message 7 of 7
(4,562 Views)