LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LabView generate a mouse click for another program?

Solved!
Go to solution

I have an old PTZ camera and need to control the Pan and Tilt functions but can't interface to the camera's software. I can control the camera through the old screen interface. Is it possible to generate a signal that the OS (Win XP) would interpret as a mouse click on the camera's screen interface?

 

Thank you

0 Kudos
Message 1 of 3
(5,316 Views)
Solution
Accepted by topic author Rick N.

Hi Rick,

      It's a bit of work, but the windows API provides functions for mouse control.  There are many searchable posts on this, for example...

 

I don't know if .NET offers any mouse-event tools - if so, they'd be simpler. 

 

There are tools called "Macro Recorders" which you could use to record some keyboard and/or mouse actions - and invoke those actions later using LabVIEW.

 

If, by chance, camera controls are sent via RS232, it might be possible to "sniff" the comm interface and figure out what the syntax is - then you wouldn't need the old application at all!

 

Luck/Cheers.

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
Message 2 of 3
(5,294 Views)

Hi Rick,

 

tbd has provided some great pointers in the right direction. You will need to the use Windows API functions for mouse control. I just want to supplement that with a few knowledgebases and example programs that you can use to modify. 

 

How Can I Progammatically Simulate a Mouse-Click?

How Can I Simulate Key Presses with Front Panel Controls?

How to find the key commands for mouse clicks on another windows program

Executing Print Screen and Other Keyboard Events from LabVIEW on Windows 2000/98/95

 

Hope this helps!

 

Thanks,

Warm regards,
Karunya R
National Instruments
Applications Engineer
Message 3 of 3
(5,268 Views)