RBScript.Context

From Xojo Documentation

Property (As Object )
aRBScript.Context = newObjectValue
or
ObjectValue = aRBScript.Context

Supported for all project types and targets.

The object (e.g., window or class) that is made available to the RBScript.

Notes

You cannot pass any objects between the context and the script. This includes, for example, variants and arrays. Any methods or properties that use objects will not be allowed within the script.

For example, you can create a custom class and assign it to the Context property. The script would then have access to the methods and properties of this class. The methods become global methods and the properties become global properties.