Parameters in Global Script

I'm using the Cloud version of Mongoose with C# scripts.

I'm trying to execute a Global Script from a Form Script and pass parameters.  I've been able to execute a Global Script from Form Script.  This is the first time I've tried to pass parameters.

This is how the Help shows calling a Global Script.

ThisForm.CallGlobalScript("MyGlobalScript", "inputValue1", "inputValue2", _
   "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "")

The Help also says this:

All global scripts and inline scripts must contain at least one procedure of type Sub or Function with the procedure name of Main. No parameters can be passed to the Main() procedure as command arguments. A global script can have more than one procedure. Other procedures can be named by any valid Visual Basic or C# name.

Only the Main() procedure in any global script can be called from WinStudio. This is the procedure called when the script name is invoked from within Mongoose.

So it appears that I can only call the Main and the Main doesn't allow parameters. But since the CallGlobalScript command has parameters then I must be missing something.

Does anyone know how to pass parameters to a Global script. Thanks for your help.

Parents Reply Children
No Data