I'm not sure if I understood what you mean? You can just call a procedure from a subscript from the main script (see script-based libraries demo). Is that what you are looking for?
Thank you for your response. That seems to work only before the execute/compile command.
You can just deifne that method and then implement it in delphi the way you want. This is specific and you will need to build it yourself, but I don't think it's complicated, all you would need to do is to load the script file in a scripter component and execute it. I would just suggest that you use a separated Scripter component to load the script file.
Thank you for your answer, that worked, but I want to set variables in main script by assigning values in the sub script. That seems not possible, but I think I can make a different kind of mechanism.