Forums > MaxMSP

Ask for the dirty bit of a patcher ?

April 23, 2011 | 3:32 pm

Hi,

Did somebody found a method (using either java, js, or whatever..) to ask for the dirty bit of a max patcher ? (to know if the patch have been modified or not, and then automate the save)
With [thispatcher] you can reset the dirty bit but you cannot know its actual state.

I would need this because i’m automating load/replacement of a ‘module’-patcher which is inside a bpatcher that i edit directly** and I would need to show a dialog to ask for saving, if the patcher’s bpatcher have been modified, just before replacing it in the bpatcher. ***

Thanks,

**(you can edit directly bpatchers content using "new view of …" with the ctrl key and then clicking on "Modify Read-Only" in the file menu)

***(using [script sendbox 'bpatcher-scripting-name' replace 'patcher-name'] -> [this patcher] )


April 23, 2011 | 9:16 pm

in js, this.patcher.wind.dirty will tell you the dirty state of the patcher.

-Ben


April 24, 2011 | 1:38 am

Thanks Ben!


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