clear the max window from within a patcher ?

    Jul 17 2009 | 10:30 am
    Is there anyway to clear the max window from within a patcher?
    Sometimes you want to refresh a window for debugging/ and it is pain if you patch is big or your screen is small to find the max window behind the patcher and hit the x on the bottom then go back to your patch... seems like a small deal but if you are debugging lots of small errors or chasing an off by one or some such and having to do this tens, if not hundreds of times a day, it gets bothersome.
    I just want to see the junk from the present execution of my patch and when i reset my patch i want the max window to clear too. I also get irritated by third party externs that are super chatty and muck up your max windah before execution. You can embed the whole dsp panel in your match... practically everything in max is a patch... is there no way to bang the max windah clear from within your patch? That would be boss.

    • Sep 11 2009 | 12:34 pm
      Hi! Yeah, I agree with you. Sometimes that makes me angry too. I already tried to edit the "maxinterface.json" file, there's some lines in there about max window, but I had no sucess. The solution I found so far is a series of shortcuts, which are not very handy because it's too many steps. You are in your patch: - use cmd+M to call max window. - press cmd+A to select all - press backspace to delete the selection - then use the OSX shorcut "move focus to next window in active app", which in my mac is cmd+ That a bunch of steps, doesn't solve the problem at all. Maybe with some kind of script to trigger all that shortcuts would be more usefull.
      best regards, dc
    • Sep 11 2009 | 2:19 pm
      If you're on a mac you can use applescript and the [shell] or [] external which you can find on I've attached one below which should do the job trick. You can trigger it by sending the message "osascript users///clearmaxwindow.scpt". You could also trigger the script using keyboard commands. I hope it helps.
    • Sep 11 2009 | 6:27 pm
      great script!
    • Sep 15 2009 | 4:04 am wrote on Fri, 11 September 2009 09:19If you're on a mac you can use applescript and the [shell] or [] external which you can find on I've attached one below which should do the job trick.
      It would be nice to have a script which does this, which I seem to do a lot:
      --Hide Foreground --Hide Background --Select All (cords) --Hide on Lock --Show Background --Show Foreground
      I think the foreground/background stuff can be done with messages to Max, but I don't know about the selection and Hide on Lock. It would be interesting to see how far one could go within Max itself (without {shell]), I imagine most commands are possible, but may be unexposed for safety reasons... you know how sloppy we users can get...
    • Oct 05 2009 | 12:43 pm
      If you want to show/hide all patchcords I find it easier to select all and then command+shift+drag to de-select everything but the patch cords and then toggle show or hide. However you can do this all with keyboard shiftcuts in max. You need to edit the maxinterface.json text file. Go to about line 375 and you will find the "Show Foreground" and "Show Background" blocks, edit them to look something like this:
      			"message" : "showfg",
      			"label" : "Show Foreground",
      			"target" : "owner",
      			"invmsg" : "hidefg",
      			"invlabel" : "Hide Foreground",
      			"shortcut" : "option+A"
      			"message" : "showbg",
      			"label" : "Show Background",
      			"target" : "owner",
      			"invmsg" : "hidebg",
      			"invlabel" : "Hide Background",
      			"shortcut" : "option+S"
      Notice that I've added a ,comma, to the end of the last line before my new "shortcut" definition. This will make the shortcut toggle for show/hide foreground command+alt+A and show/hide background will be command+alt+S (on a mac at least!). Now you should be able to run through the keyboard shortcuts in order:
      command + E command + alt + A command + alt + S command + A command + K (or command + L) command + alt + A command + alt + S command + E
      and voila you can show/hide all patchcords, not quite as simple as one shortcut to do everything but it does work. You can also create a shortcut for copy compressed which I find really useful. You will have to restart max for the new shortcuts to take effect but the cool thing is that the key codes show up in the menus so you won't have to worry about forgetting them.
    • Oct 05 2009 | 4:53 pm
      nice idea with the shellscript.
      back in the days i have been using
      "______________________"  | [print ]
      to get some structure into messy maxmsp consoles, works too.
    • Oct 05 2009 | 5:06 pm
      Yeh that's a nice trick too, especially when you're checking something a bit hectic and you have [print]s all over the place. I've written a little javascript which is like [print] which you can instantiate with multiple arguments and gives you an input for each, nothing major but it saves a few seconds here and there.
      // lh.nprint
      inlets = jsarguments.length - 1;
      function anything() {
          everything = arrayfromargs(messagename, arguments);
          parsed =;
          names =;
          function format(x) {
              if (typeof(x) == "number") {
                  if (x % 1 == 0) {
                      return x;
                  } else {
                      return x.toFixed(6).toString().replace(/0+$/,"");
              } else {
                  return x;
          post(names[inlet + 1] + ": " + parsed.join(" ") + "n");
      // EOF
    • Jan 13 2011 | 2:45 am
      Hi All!
      There is a external to clean max window, check here:
    • Jan 13 2011 | 2:25 pm
      great external ! thanks a lot for this :-)
      it would be realy cool to implement a save function. best, d.
    • Mar 02 2012 | 3:56 pm
      Just tried this external with Max 6, and it doesn't seem to work.
      I'm surprised there isn't a clearmaxwindow message that can be sent to the 'max' object
    • Mar 02 2012 | 9:07 pm
      Why doesn't cycling74 just make a keyboard shortcut to clear the Max window? This user request is as old as this window ...
    • Mar 02 2012 | 10:16 pm
      A keyboard shortcut doesn't really help. I'm sending a lot of log info to the max window and when certain patchers change, the old log info is of no use and I'd like it to just go away automatically when the next patcher is loaded (as loading is also done programatically)
    • Jun 13 2012 | 7:45 am
      Dear uncle Cycling, the year is 2012, we have robots and nanotech, Pro Tools is running on soundcards from third parties and we even have Max VI.
      But...'s still not possible to clean the Max window from within a patcher. Is is prohibited by religion, Microsoft or even Apple ?
    • Sep 05 2012 | 1:43 pm
      +1 Yes, it would be really nice, when distributing apps made with max, to have the ability to ease the task of sending [parts of] the Max window to the developpers from unexperienced end-users. Being able to do the following with messages-to-max (or to some object, whatever) would be reaaaaally nice : - clear the max window - dumping [parts of it] in a coll
      any reply from unkle'74 ?
    • Nov 06 2012 | 1:25 am
    • Apr 12 2013 | 2:35 pm
      bumpy bump
    • May 26 2013 | 10:16 pm
      bump, need it too!mwc don't works in Max 6.1.2, reports another "ok" message in the Max Window. Working with shortcuts don't works too...backspace don't delete the selection, and I don't need to work with javascripts, need a stupid ext... thanks!!!
    • Jun 22 2013 | 10:02 pm
    • Aug 24 2013 | 3:26 pm
      I also kindly hope that there will be a message to clear the max window from within a patch!
      In the mean time... is that apple script of Luke Hall still available? I don't see it...
    • Apr 20 2014 | 2:11 pm
      Really? It's 2014 and we still don't have a command to do this, ridiculous. C'mon Cycling, get your act together. Please.
    • Apr 22 2014 | 1:46 am
      Is there a security concern? The current format ensures that logs of certain lower level events and/or warnings will be seen by the user.
      Or maybe Cycling doesn't want copyright notices to be cleared without user action?
    • Apr 22 2014 | 7:29 am
      I don't think so. I asked them about this about a year ago and they said it was on the list of things to do... I guess they've just not got round to it yet... same as being able to copy from the MAX window in M4L...
    • Jun 04 2015 | 12:05 pm
      In a 2009 email to Cycling requesting a shortcut to clear the Max window like "pure data" this was their reply:
      "We have made the clearing of the Max window behave like any other programming environment, as it is a log of useful posts and errors. We kind of want to make it hard to wipe completely."
    • Jun 04 2015 | 12:18 pm
      Some time ago I built a little app along with an object called "udpprint" which "prints" stuff to a log window in that app via UDP. Would be trivial to add a command to "clear" that log window. I use that instead of 'print' for pretty much everything.
      If people are interested in this, then I'm happy to make it available. It's only for the Mac though
    • Sep 26 2017 | 7:10 am
      Just in case anyone else stumbles upon this thread and isn't aware of the change introduced in 7.3.2, our wishes have been granted. "Max: 'clearmaxwindow' message to Max"
      Also, does anyone else notice that, lately, when clicking in the reply text entry form here, that the page scrolls to the top (using Chrome, Version 61.0.3163.100 (Official Build) (64-bit))? Has been happening to me for a little while and not sure why.
    • Sep 26 2017 | 8:02 am
      Or, for anyone familiar with the 'clear clip meters' shortcut in Pro Tools...
      Option+c will clear the max window.
      I use a template and just added this in a subpatch with some other shortcut/workflow stuff so it is always there when I start working on a new patch.