Load a patch from Package at Max startup?

tmhglnd's icon

Hi all! I'm looking for a way to load a patch when Max is started (so not at the system startup). This patch is part of a package, so I've tried to use the 'init' folder. But putting the patch in the init folder makes Max crash at startup or it opens the patch but doens't find the objects (probably because the init folder is at a too early stage of startup, before object mappings/bindings?). When I put the patch in the 'patchers' folder and use a .txt file with the max message 'openfile' it tries to open the patch but gives me the error: Openfile: file not found. Also the documentation for Controlling Max with Messages states: The openfile message is intended for batch collective building. So I'm not sure if this is the way to go. I've also tried to create a folder named 'max-startup' in the package, but this does not work. There is a folder in the Package Contents of the application with this same name and if you put a patcher there it will load at startup, but I would like to be able to do this without having to manually move the file there.

Is there any other way to do this? I'm not finding any documentation on what kind of messages can be used in this init folder (Except for the Controlling Max with Messages, maybe that's all there is though). Thanks for any pointers.