Ask for the dirty bit of a patcher ?

Apr 23, 2011 at 3:32pm

Ask for the dirty bit of a patcher ?

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] )

#56534
Apr 23, 2011 at 9:16pm

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

-Ben

#202728
Apr 24, 2011 at 1:38am

Thanks Ben!

#202729

You must be logged in to reply to this topic.