XojoScript.Precompile

From Xojo Documentation

Method

XojoScript.Precompile(optimizationLevel As XojoScript.OptimizationLevels) As Boolean

Supported for all project types and targets.

Runs the parser immediately using the specified optimizationLevel instead of waiting until the next call to Run. Returns True if the optimization succeeded, False if there was an error.

Sample Code

This precompiles a script with an optimization level of "High" before it runs:

If XojoScript1.Precompile(XojoScript.OptimizationLevels.High) Then
XojoScript1.Run
End If