12-04-2019 05:26 PM
Hi,
I have an external activeX controllable program that has event triggers, ie...OnThisHappens() event triggers. I want the to create a event listener and trigger a vi to execute when the event is triggered. Whats the best way to do this. A Reg event callback? I can see the even in a reg event callback list, but am having issues with the callback vi. I don't really need to pass any references or parameters into the vi, I just want to listen for an OnThisHappens() event and trigger an unrelated vi. Is this the right way to do this?
12-04-2019 09:32 PM
Hi acidburn,
@acidburn wrote:
I have an external activeX controllable program that has event triggers, ie...OnThisHappens() event triggers. I want the to create a event listener and trigger a vi to execute when the event is triggered. Whats the best way to do this. A Reg event callback?
Yes, use the Reg Event Callback node.
You do need to have a VI matching the expected pattern, but then you can call whatever you want.
I've also used User Events in the callbackVI (with all the references etc) via the "User Parameter" to allow queuing actions as Events (you could also use a Queue, if you wanted a Queue instead of an Event).