WinWrap® Basic is an embedded macro language component available for .NET and COM 32/64 bit Windows applications. The WinWrap® Basic Component is an alternative to Visual Basic for Applications (VBA), ActiveX (e.g. VBScript, JScript, PerlScript, Rexx-based WSH engines and others), and VSTA for this purpose. The WinWrap® Basic Component is compatible with VBA, Sax Basic, VB.NET and Visual Basic 6.0 style scripts.
You or your customer can write script code that executes when method calls are made by the application. Scripts are validated for syntactic correctness and all the application has to do is call an interface method. This is a great way to script, with the application calling your script code at the appropriate time.
The application parses the script (ModuleInstance) and creates an instance (CreateInstance), gets an interface reference (Cast) and calls the script method.
The expression action.Started(this) calls the script code.
The application defines the IIncidentAction interface and its methods.
A script class module implements the IIncidentAction interface and its methods.
The WinWrap® Basic IDE facilitates writing the methods for an implemented interface:
Pressing "Enter" at the end of the Implements line writes all the needed interface prototypes:
WinWrap® Basic provides a comprehensive solution to adding scripting to your application. Calling script code with an interface and Implements is an alternative to calling script code through events. Both this solution and the Extend the WinWrap® Basic Scripting Language solution present roughly equivalent techniques for calling script code. It may be a matter of style which technique you use.
See WinWrap Examples for instructions on how to download and run "Example 5 - Implements".
Copyright Polar Engineering, Inc.