First Scripting Application
|Top Previous Next|
Here you can find a walk-though for creating a simple application capable of running VBScript scripts.
Let's suppose that there'll be Main procedure in the script which will accept two integers num1 and num2, and return their sum which will then be displayed to a user (see code sample below).
The following steps have to be performed to create the application:
Sub Main(num1, num2)
res = num1 + num2
procedure TForm1.Button1Click(Sender: TObject);
LMDScriptControl1.Source := Memo1.Lines;
LMDScriptControl1.RunProc('Main', [3, 7]);