Author Topic: Plugin TextVariableChanged - How Detect Event  (Read 3923 times)

CrossWiseRanger

  • Newbie
  • *
  • Posts: 13
Plugin TextVariableChanged - How Detect Event
« on: July 12, 2021, 07:34:40 PM »
For a plugin using:

TextVariableChanged(String Name, String FromValue, String ToValue, Guid? InternalID) – this event is raised when a watched text variable’s value is changed.

How do I receive the event in VA?  Where do I watch for the value to change?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Plugin TextVariableChanged - How Detect Event
« Reply #1 on: July 12, 2021, 07:41:42 PM »
What do you mean by "receive the event in VA"?

This is an event you can subscribe to within a plugin, as shown in the example in the documentation. It has no GUI

CrossWiseRanger

  • Newbie
  • *
  • Posts: 13
Re: Plugin TextVariableChanged - How Detect Event
« Reply #2 on: July 13, 2021, 06:07:35 AM »
What do you mean by "receive the event in VA"?

This is an event you can subscribe to within a plugin, as shown in the example in the documentation. It has no GUI

Aha!  The vaProxy.Command.Execute() is what I had missed.

Is there a way for VA to detect a variable changed by a plugin without polling?
« Last Edit: July 13, 2021, 07:50:30 AM by CrossWiseRanger »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Plugin TextVariableChanged - How Detect Event
« Reply #3 on: July 13, 2021, 01:59:32 PM »
As in, a fully native command? No.

You could use an inline function to subscribe to the event in the same way a plugin would, but if your plugin is the one changing the variables, you might as well have it run the commands, without needing an additional component.