LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mixing Filter events with user events

Hi,

 

I'm looking for a way to mix the mouse-down?(Filter) event with a user-defined event.

 

For this I need the events to have the same event data type.

I thought I could obtain that - using a Register Event Callback to obtain a reference constant to a potential callback vi, and call by reference to then extract the datatype.

 

eventdata.PNG


The data type I obtain like this is almost correct - unfortunately the entire event datatype seems to be a bit muddled (see discussion here: https://lavag.org/topic/7759-user-event-datatype-propagation/) , so I assume that is what is destroying my behaviour.

 

But in the end I was able to obtain what seems to be a matching datatype.. the "structure" now seems to be happy with the data type but the configuration window isn't.

mixingfilterevents.PNG

 

 

 

Question 1: Why is this not working? How can I make it work? Can you ever match user events with dynamic events?
 

Question 2: Is there any nicer way I can simulate (target/OS-independend) a mouse-click on a button? 

 

(I am not looking for a workaround on a specific vi. I'm working on manipulating arbitrary / unknown vis and simulating mouse-clicks there. I am currently using scripting to duplicate the code inside the diagram frame and execute it, but that's adding unnecessary code duplicity and not something I want to support-long time)

 

Birgit

0 Kudos
Message 1 of 3
(2,953 Views)

I think the final issue is the "post event data".  User Events do not have the ability to discard, etc like the filter events do.  If you are not actually filtering the event, try using the non-filtered mouse-down event.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,925 Views)

The problem is that I actually deal with arbitrary VIs, which means I have no influence over what kind of events are being used.
(I write software that modifies other users' software..) 

 

I can, of course, use scripting... and "fake" the filter behaviour
- remove everything from "Mouse Down?" and put it inside "Mouse Down"
- execute the original "Mouse Down" only if there is no discard.

 

But that is ugly. And causes code duplication. And I don't like it at all.

0 Kudos
Message 3 of 3
(2,923 Views)