Forums > MaxMSP

oberving subpatcher behavior

April 15, 2011 | 6:24 pm

I’m wondering if there’s a way to observe whether or not a subpatcher is open? Say, if it is open, it outputs a 1, if not, zero. I’m a little lost. Thanks.


April 15, 2011 | 10:25 pm

The easiest way that I can think of is to use a little javascript. Throw this in a js object:

function bang()
{
outlet(0, this.patcher.wind.visible)
}

It will output a 0 if the patcher window is not visible, and a 1 if visible. If you want to "observe" it, one way is to set up a Task function to do this.

-Ben


April 16, 2011 | 12:30 am

thanks. the deeper i go, the more i realize i need to learn some js. got any idea on how i can do this as effectively as possible w/o spending $? Thanks.


April 16, 2011 | 2:39 am

Hey, I got the js object straightened out and it works, but i have to input the code every time i open the patch. I know nothing of js. Can you help? Thanks.


April 16, 2011 | 3:42 am

nevermind. check out the "active" object. exactly what i wanted.


Viewing 5 posts - 1 through 5 (of 5 total)