Forums > MaxMSP

clear the max window from within a patcher ?


kp*
July 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.

-kp


September 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


September 11, 2009 | 2:19 pm

If you’re on a mac you can use applescript and the [shell] or [aka.shell] external which you can find on maxobjects.com. 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.

lh


September 11, 2009 | 6:27 pm

great script!


September 15, 2009 | 4:04 am
thereishopeforus@hotmail.com wrote on Fri, 11 September 2009 09:19
If you’re on a mac you can use applescript and the [shell] or [aka.shell] external which you can find on maxobjects.com. I’ve attached one below which should do the job trick.

lh

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…


October 5, 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.

lh


October 5, 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.

-110

 


October 5, 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

// lh.nprint
inlets = jsarguments.length - 1;

function anything() {
    everything = arrayfromargs(messagename, arguments);
    parsed = everything.map(format);
    names = jsarguments.map(format);
    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

January 13, 2011 | 2:45 am

Hi All!

There is a external to clean max window, check here:

http://www.bloghotel.org/tworowski/85531/


January 13, 2011 | 2:25 pm

great external !
thanks a lot for this :-)

it would be realy cool to implement a save function.
best,
d.


March 2, 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


March 2, 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 …


March 2, 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)


June 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… …it’s still not possible to clean the Max window from within a patcher. Is is prohibited by religion, Microsoft or even Apple ?


September 5, 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 ?


November 6, 2012 | 1:25 am

bump!



Nat
April 12, 2013 | 2:35 pm

bumpy bump


May 26, 2013 | 3: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!!!


June 22, 2013 | 3:02 pm

up


August 24, 2013 | 8:26 am

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…


April 20, 2014 | 7:11 am

Really? It’s 2014 and we still don’t have a command to do this, ridiculous. C’mon Cycling, get your act together. Please.

  • This reply was modified 5 months by  olby.

April 21, 2014 | 6:46 pm

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?



Lee
April 22, 2014 | 12: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…


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