Jump to content

How Can I Programmatically Simulate a Mouse Click?


Recommended Posts

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...

Link to comment

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...

Link to comment

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!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.