LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Send mouse clicks to RS232?

Does anybody know if it is possible with labview to register
mouseclicks (from any application) and send a signal to the serial
output?

Thank you
Michi
0 Kudos
Message 1 of 3
(2,937 Views)
Michi,

You can monitor mouse events in LabVIEW by looking at windows events. You
can find a piece of example code on this page: http://zone.ni.com/devzone/devzone.nsf/webproducts/2212A1CF726BE56C862567AC00583B8C?opendocument

Hope that helps.
Kamran

michi@gmx.ch wrote:
>Does anybody know if it is possible with labview to register>mouseclicks
(from any application) and send a signal to the serial>output?>>Thank you
>Michi
0 Kudos
Message 2 of 3
(2,937 Views)
In article <3a5efb7b.10905020@news.ethz.ch>,
michi@gmx.ch wrote:
> Does anybody know if it is possible with labview to register
> mouseclicks (from any application) and send a signal to the serial
> output?
>
> Thank you
> Michi
>

I've read the status of the mouse button using the GetMessageA function
in user32.dll (its the 3rd argument). Unfortunately, I think labview
also calls this function to determine mouse events, so if you read this
function in a fast loop, Labview fails to react to mouse clicks in
regards to events on the fron panel. If you want to control something
cheaply using a button, maybe you could try a cheap game pad or 2-
button joystick and read the game port using the "in port.vi"
function. You could also rig up a button and h
ook it between a data
line and ground on the parallel port if it is not in use.

Max


Sent via Deja.com
http://www.deja.com/
Message 3 of 3
(2,937 Views)