LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simulation of a mouse click on front panel

How doing this ???
Thanx for help !

Matt
0 Kudos
Message 1 of 19
(9,181 Views)
What kind of click do you want to simulate? Just a random "mouse down" anywhere on the VI? Pressing of a button?

If you have a "mouse down" event and want to trigger it programmatically, add a second trigger to the same event (e.g. value change of a hidden boolean), then write a signaling property to it to fire that event.
0 Kudos
Message 2 of 19
(9,181 Views)
Hi Mc
Just for fun, I developed this attached vi
1 Info about mouse event (user32.dll) is available in microsoft site.

2 Tis vi simulates mouse up or mouse down. Bear in mind that if during simulation cursor is over some control, perhaps the function of that control is activated. this could be a risk.
3 If not a special case, Altenbach solution can be more useful

Ok enjoy it and hope it helps.

Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 3 of 19
(9,172 Views)
my goal is to simulate any clicks on buttons of front panel.
Alipio, my version of LV is 6.1... 😞
0 Kudos
Message 4 of 19
(9,172 Views)
Hi Mc.
Sorry, I use LV 7.1 and can´t save for 6.1.
See attached doc: You can work your vi out .
For dwFlags values, see this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/MouseInput/MouseInputReference/MouseInputFunctions/mouse_event.asp

It is the microsof page describing mouse_event function.
Hope it helps
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 5 of 19
(9,174 Views)
Hello,

Here it is the same VI in LV 6.1.

Hope this help.

Isabelle J.
National Instruments
Isabelle
Ingénieur d'applications
National Instruments France
0 Kudos
Message 6 of 19
(9,174 Views)
Hello, i would like to simulate a mouse click on the front panel in windows with labview 7.1. Do you know where i can get a VI that do that?

Thanks
Lukas
Lukas
0 Kudos
Message 7 of 19
(9,103 Views)
Lukas,

The example attached here, though not 100% clear, should give you the right idea. You presumably need to:

1. Set the mouse cursor to the screen position you want the click to happen
2. Simulate the click

To achieve item 1, you could use the same DLL that is attached here, but it is easier to use the Setting the Mouse Cursor's Position in LabVIEW example found on the NI site instead.

To achieve item 2, you can steal the code that is attached here--specifically, copy the Call Library node. Use a dwFlags argument (the top input to the node) of 2 for mouse down and 4 for mouse up.

Regards,
John
Message 8 of 19
(9,089 Views)
Also, once again - please stop posting the same question to multiple threads - this is the third thread today.

___________________
Try to take over the world!
0 Kudos
Message 9 of 19
(9,085 Views)
Lukas,

I strongly agree with what tst has told you: by asking the same question numerous times, you have caused several people here (perhaps myself) to waste their valuable time. This makes it less likely that you'll get help if you have follow-up questions.

Are there actually online forums where this is acceptable behavior?

--John
0 Kudos
Message 10 of 19
(9,079 Views)