This can't work.
Include is a preprocessing step. It happens when the code is compiled. So it can't be determined when the program is running.
You could change this so load_scripts(path$) is part of a separate program. It would read all the file names and write a new file "MyIncludes.bb" which would look like this:
Include "myfile1.bb"
Include "myfile2.bb"
Run this before compiling your main program, which would simply include the file "MyIncludes.bb".
Another possible snag is the order in which files are included.
But if the included files just contain functions then that shouldn't be a problem.
Include is a preprocessing step. It happens when the code is compiled. So it can't be determined when the program is running.
You could change this so load_scripts(path$) is part of a separate program. It would read all the file names and write a new file "MyIncludes.bb" which would look like this:
Include "myfile1.bb"
Include "myfile2.bb"
Run this before compiling your main program, which would simply include the file "MyIncludes.bb".
Another possible snag is the order in which files are included.
But if the included files just contain functions then that shouldn't be a problem.