LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview programmed mouse

I am trying to make a program with labview that can controll the
computer mouse.
The mouse should move automatically to some points (these points are
set before) and should be able to left and rigth click(also set
before). I tried to make this but i just don't know how to start.
I made a stop button and a loop because the movement that the mouse
makes should be done over and over till the stop button is pressed.This
is a problem too, because when i let a program control the mouse i
can't press the stop button anymore. So i need a hotkey that let the
stop button works. I have no idea how to make a hotkey.

Anyone who has answers to my quetions please answer them as fast as
possible.
Mail me add me on msn or reply on this subject.

Greetings.

0 Kudos
Message 1 of 3
(2,930 Views)

There is no built in way to control the mouse, so you will have to result to calling external code. In windows, this would be the SetCursorPos and Mouse_Event functions from user32.dll which you can call by using the Call Library Function node from the Advanced pallete. If you search the forums for terms like "simulate mouse" or similar you should find some examples.

As for the a stop hotkey, if you want something which will work in any case you should use the input VIs (also in the advanced palette) and you will be able to monitor which buttons on the keyboard are pressed. You can run this in a loop checking several times a second and stop the loop once you detect your keyboard combo.


___________________
Try to take over the world!
Message 2 of 3
(2,926 Views)
I found this program a while back, this might help you out in positioning the mouse.  I do not know the commands for right or left click, but I am sure it can be done.
0 Kudos
Message 3 of 3
(2,903 Views)