geges Posted September 14, 2007 Report Share Posted September 14, 2007 How Can I Programmatically Simulate a Mouse Click? This is my problem ...and I found this topic in NI Knowledgebase too. But I can't download the attached example file. Can you help me? I would like to programmatically control my mouse so that I can move to a specific control and click on it without user interaction. This would allow me to use a Mouse Up or Mouse Down Event without using Value Signaling or User Events. It will also allow me to see the behavior of the mouse on the front panel. http://digital.ni.com/public.nsf/allkb/0CC...6257350004E1B6A Simulate Mouse Click.vi link isn't work at my computer... Quote Link to comment
TobyD Posted September 14, 2007 Report Share Posted September 14, 2007 QUOTE(geges @ Sep 13 2007, 12:16 AM) How Can I Programmatically Simulate a Mouse Click?This is my problem ...and I found this topic in NI Knowledgebase too. But I can't download the attached example file. Can you help me? I would like to programmatically control my mouse so that I can move to a specific control and click on it without user interaction. This would allow me to use a Mouse Up or Mouse Down Event without using Value Signaling or User Events. It will also allow me to see the behavior of the mouse on the front panel. The only way that I know to do this is with the User32.dll in windows. Call the SetCursorPos function and send it the horizontal and vertical values of the target you want to click, you could then call the mouse_event function in the same dll to trigger the mouse click. See example... Quote Link to comment
geges Posted September 15, 2007 Author Report Share Posted September 15, 2007 QUOTE(TobyD @ Sep 13 2007, 11:41 PM) The only way that I know to do this is with the User32.dll in windows. Call the SetCursorPos function and send it the horizontal and vertical values of the target you want to click, you could then call the mouse_event function in the same dll to trigger the mouse click. See example... Thanks for the reply! I try it now! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.