How to Open a maxpat in a new window?

peacesong's icon

How might one open a separate maxpat in a new window rather than as part of the current running app?

Within the main app, I would like to click on a message button and have a another window open. Currently the separate functionality is in a .maxpat but could easily be put in another container if easier.

Thank you for guidance,
Peace

tegid o's icon

Take a look at [pcontrol]

peacesong's icon

Thank you for your reply.

How does [pcontrol] reference the specific [file].maxpat?

Ie, there's no file name listed anywhere in the example or inspector attributes.

is an object that begins with pcontrol_ automatically a pcontrol object for some ??? unknown patch?

Tried adding the 'load' message followed by the name of the patch, but get "load: no such object"

tegid o's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You need to encapsulate the patch you want to open, connect it to a pcontrol object and send pcontrol an "open message. Like this:

peacesong's icon

Yes, this workaround works thank you!

cap10subtext's icon

also look at the openfile/closefile messages to max in the documentation... it can be a little more dynamic.