clear the max window from within a patcher ?

Jul 17, 2009 at 10:30am

clear the max window from within a patcher ?

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

#44762
Sep 11, 2009 at 12:34pm

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

#161062
Sep 11, 2009 at 2:19pm

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

#161063
Sep 11, 2009 at 6:27pm

great script!

#161064
Sep 15, 2009 at 4:04am
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…

#161065
Oct 5, 2009 at 12:43pm

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

#161066
Oct 5, 2009 at 4:53pm

 
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

 

#161067
Oct 5, 2009 at 5:06pm

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
#161068
Jan 13, 2011 at 2:45am

Hi All!

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

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

#161069
Jan 13, 2011 at 2:25pm

great external !
thanks a lot for this :-)

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

#161070
Mar 2, 2012 at 3:56pm

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

#161071
Mar 2, 2012 at 9:07pm

Why doesn’t cycling74 just make a keyboard shortcut to clear the Max window?
This user request is as old as this window …

#161072
Mar 2, 2012 at 10:16pm

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)

#161073
Jun 13, 2012 at 7:45am

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 ?

#161074
Sep 5, 2012 at 1:43pm

+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 ?

#161075
Nov 6, 2012 at 1:25am

bump!

#161076
Apr 12, 2013 at 2:35pm

bumpy bump

#161077
May 26, 2013 at 3:16pm

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!!!

#250748
Jun 22, 2013 at 3:02pm

up

#253757
Aug 24, 2013 at 8:26am

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…

#259890

You must be logged in to reply to this topic.