loading a resource at startup ?
Hi,
I would like to load a resource (namely, the content of a dict) from a package when Max startup (or better : when the package is enabled/disabled). The idea being here that this resource could be shared among multiple related packages. There used to be the max-startup folder, but now that it's gone, is there any way to achieve this ?
Thanks for any hint!
NB : I am aware that it is possible to launch a patcher at system startup, but this is not what I am looking for.
Would loadbang or loadmess be the answer?
Hi Andy,
The real question is : how would you do, without explicitely opening a patch in the first place ?
The max-startup folder was automatically opened when Max launched, but there is no such magic folder in Max packages....
I'm not really sure what you are wanting to do. Can you please bit a bit clearer? Are you saying that you want a patch to open in response to something happening to the resource file?
I just wanted to load some resources from a package when opening Max.
I want to do this a multiple packages are related and I wanted the overview patch to gather information from all these related packages.
Now since the file to load is in Max search path (as it is in a package), I can work around this, by explicitely looking for such file in the various packages, but I wanted it to work the other way round, that is, any "related package" just load its information into the common dictionary.
Well, I'm still a bit confused. Bring it all together in a Project with a table of search paths maybe?
I don't think I can help you beyond that.
Answering as best I can, and interested in the right answer...
I know that packages like Bach (and my upcoming Scheme for Max release) can load things at start up because they put code in a folder called "extensions" instead of "externals". (Thanks Jeremy Bernstein!). I don't know if you can do this for something other that externals in C/C++ though. Does anyone know? That might be a good start for googling...
Perhaps this page will help: https://docs.cycling74.com/max8/vignettes/packages
Thanks Iain. Yes, I have seen that but was hoping for a non-external solution...