Have a look in the MaxScript User Reference, keywords 'Including Scripts within Scripts'. Basically it is the 'include' command. But Bobo describes it way better than I ever could ;)
Actually, against logic, the Macroscript and UserMacro folders are evaluated before the Scripts/Startup and UserStartup folders. (The name suggests the opposite.) This is because Startup scripts, unlike macros, have access to the viewports and can create and manipulate objects. If you want to use functions in MacroScripts…
well, not exactly what I was looking for but it does work. I have split the script into UI stuff and core functions and use include "fnctions.ms" at the start of my macroscripts thx!
I just found a better answer. I too wanted to call a function from the UI. You need to pre-initialize any function you want to call from the UI. This allows the script to access a function that is not yet defined. Similar to the following article.…
heyho, ok the problem is not that easy but I can hardly find information about that. At least nothing that helps me. I have several functions in my .ms file They are not inside of anything. Now I want to create some macroscripts that call these functions instead of putting the function itself inside the macroscript. Now…