requireScript
Require scripts from within scripts.
Overview:
Functions:
API Reference
requireScript()
requireScript()Returns the value that was returned by the given script. Required scripts are cached per script.
let Result = requireScript("Example.js")Parameters:
relativePath(String) Name or relative path of the script to require.
They will not run as separated scripts and will be executed under the same environment as the script that is requiring the script. That also means that required scripts are not loaded globally and will re-require every time required from a different script.
Example:
var Result = requireScript("Test.js")
log.info("Test.js returned: "+ Result +" after requiring it")var ThisName = script.Name
return ThisNameLast updated
Was this helpful?