Event Controls

Event-driven scripts

An event-driven script is a script called when an event occurs in the Filter or Simulator, or when the application's RunScript function is called. Such a script needs to contain a function which matches the name of the file, and the function takes as inputs a message string and the object calling the script (either a filter, simulator or application object).

For instance, here is a Filter's OnComplete script which will write the message string to the message window:

   Function FilterComplete(msg, fil)
        Dim App = fil.Parent.Parent.Application
        App.WriteMessage msg, "debug"
        End Function

Event Controls

Event controls give you the option of specifying event-driven script files which are called upon any or all of the following filter and/or simulator events:

ODTK 6.5