To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example programmatically sets your cursor position through the Call Library Function Node.
Description
This Set Cursor Position VI programmatically sets the position of the mouse cursor on the screen using Call Library Function Node. The Call Library Function Node calls the Windows SDK function SetCursorPos. You can modify the Set Cursor Position VI to position the mouse cursor programmatically in LabVIEW. In this example, select the horizontal pixel position of the cursor using the x position control. Use the y position control to select the vertical pixel position of the cursor.
To view information about the DLL being called, double-click on the Call Library Function Node. To create/call into a DLL in your own code, drop a “Call Library Function Node” on your block diagram. Once on the diagram, double-click on the Function Node and select the DLL and function that you are interested in.
Requirements
LabVIEW 2012(or compatible)
Steps to Implement or Execute Code
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
How to set each mouse position if I have two USB mice installed in a PC?