To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example shows how detect event that occurs in another VI
Description
The Generate Events VI allows the user to mouse down or change the values of various controls. The Capture Events VI captures the events generated by the Generate Events VI. Pressing the stop button in the Generate Events VI will stop the execution of both VIs. Be sure to start the Generate Events VI before you start the Capture Events VI to avoid getting an invalid references error.
The Capture Events VI will dynamically register any mouse down or value change of the controls associated with the Generate Events VI and return the class name of the control, the Label of the control and the type of event. The user must select the file path at which the Generate Events VI is located.
Requirements
Steps to Implement or Execute Code
1. Select Generate Events VI path
2. Run Generate Events VI
3. Run this VI
4. Use control in second VI
Additional Information or References
Generate Events VI Block Diagram
Capture Events VI Block Diagram
Link
http://digital.ni.com/public.nsf/allkb/17ABD66EA8DAA0A986256FDA0067641E
**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.
Good one.. I liked the concept..
Is there a way to detect mouse clicks on a VI that is not running?
It works perfectly, thanks so much !