LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use mouse cursor to control other GUI

I found vi for move cursor to position x and y, but don't have vi(better be v5.01 or earlier) for mouse click(enter).
0 Kudos
Message 1 of 12
(4,328 Views)
hi, i am using LV 6i. Hope this will help you in solving your problem.

Goto
Help>Examples>Advanced Examples>Picture Control Examples>Mouse Control.vi

Good luck.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 2 of 12
(4,328 Views)
I do not know if that functionality is possible in 5.01. Can you explain where you got the VI and how it works? You may also want to search NI's example programs. for help.

Goto www.ni.com >> support >> advanced search (it is at the botto--click on the words). Be sure to limit your search to just the example programs.

Jeremy
0 Kudos
Message 3 of 12
(4,328 Views)
Jeremy,
The vi to set cursor to x,y (v5.0X)is found by the example "Setting the Mouse Cursor's Position in LabVIEW" which can get by searching "mouse cursor" in NI Develop Zone.
I need now is the "click mouse" action programmablly
in Labview. This must be an universal windows command(code), suppose can CIN to Labview, but I don't know.
Yehoo
0 Kudos
Message 4 of 12
(4,328 Views)
I see what it does. The VI uses a call library node to call user32.dll. I did some searching on MSDN and found the following link that discusses how to set the click:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/MouseInput/MouseInputReference/MouseInputFunctions/mouse_event.asp

Be sure to read the note at top about the nt/2000/xp and send input.

If you need help with configuring the call library node, read "Using External Code in LabVIEW". This is usually a shipping document but you can also find it online.

Jeremy
0 Kudos
Message 5 of 12
(4,328 Views)
I did some more research and the mouse events are going to be tough to use in LabVIEW because the functions requires structures. You will need to write another program that LabVIEW can access which in turns sends data to this function. This will be non trivial but doable.

Jeremy
0 Kudos
Message 6 of 12
(4,329 Views)
Hi. I too face the same problem. I need to use the get VI which will stimulate a click. The msdn site is good, but how do i  make use of the C++ code to design a sub VI? Has anyone found a sloution to this, won't mind sharing with me. Thank you very much.
 
Conatact: p0419635@sp.edu.sg
0 Kudos
Message 7 of 12
(4,044 Views)
Please see this post.
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 8 of 12
(4,020 Views)
Hi Doug. M.  Thank a million for your help. Currently, there are many people asking about creating 'stimulating clicks' over the discussion forums, too much treads and confusion. The thread you sent me solve my problem. Surprised that i nv manage to find the right one, as there are too many repeated treads.
 
Can I suggest to NI to include such examples into the next version of LabVIEW release to benefits end users. Just a caual suggestion.
 
Once again. thanks a million
 
khsay
0 Kudos
Message 9 of 12
(4,012 Views)
khsay,

I'm glad I could point you in the right direction.  I would definitely encourage you to leave feedback on our website about what you would like to see in future versions, our R&D team looks closely at customer feedback when choosing features and examples for future LabVIEW versions. You can leave feedback here.
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 10 of 12
(3,999 Views)