to create a patcher window with sccript


    Mar 17 2006 | 1:23 pm

    • Mar 17 2006 | 1:53 pm
      hi,
      I am not sure about what you mean by "not as an abstraction". Do you mean opening a patcher from another patcher ? I f so, you can send 'load your/path/to/patch/to/load' to a [pcontrol]. Is this what you are after ?
      hth.
      Julien.
    • Mar 17 2006 | 2:37 pm
    • Mar 18 2006 | 11:14 pm
      Hi Sebastien, From the max java api documentation: snip
      |MaxPatcher| can be used in conjunction with |MaxBox| to dynamically modify and create patchers on the fly. The interface exposed is very similar to the functionality exposed by the js javascript external and thus much of that documentation for that external is applicable well.
      public class maxpatchertest extends MaxObject {
      public void makepatcher() {
      MaxPatcher p = new MaxPatcher(50,50,200,200); MaxBox b11 = p.newDefault(20,20,"toggle",null); MaxBox b21 = p.newDefault(50,20,"toggle",null); MaxBox b31 = p.newDefault(80,20,"toggle",null); p.getWindow().setVisible(true); p.getWindow().setTitle("TEST PATCH");
      }
      } /snip
      ... and from the javascript in max pdf
      snip The Patcher object is a Javascript representation of a Max patcher. You can find, create, modify, and iterate through objects within a patcher, send messages to a patcher that you would use with the thispatcher object, etc. There are currently three ways to get a Patcher, use the Constructor, access the patcher property of a jsthis (accessed as this.patcher), or use the subpatcher() method of a Maxobj object. Patcher Constructor var p = new Patcher(left,top,bottom,right); left, top, bottom, right: global screen coordinates of the Patcher window var p = new Patcher(); Uses 100,100,400,400 as default window coordinates /snip
      Good luck, and keep up the great work.
      -jim