Some javascript questions

May 4, 2007 at 2:41pm

Some javascript questions


I just started learning javascript for use in Max. I’m getting some results, but lots of questions emerge ? some of which certainly is down to me being a newbie in that kind of programming. But some maybe also due to the Max documentation not being so easy for me to find my way around as the regular Max part. I’m exposing you guys to a couple of them here:

How do I proceed to make, say, a panel with specific attributes such as pixel dimensions, background/border color, etc.. I’ve managed to create a panel through the newdefault method (and alter these attributes after the creation), but the newobject is very scarcely documented.

I’d also like to set arguments and flags at creation time, like in this example:

max v2;
#N vpatcher 10 59 211 383;
#P user jsui 2 31 104 22 1 0 0 jsui_textbutton.js;
#P pop;

- making a new subpatcher with the specified size at creation time, setting the new window’s flags (like nozoom) at creation time, and possibly preventing the new window form opening until I say so. Creating a jsui object inside with a file nameas an argument. Again, I know how to do most of this using newdefault, but I have no clue as to how to use newobject, nor to where I can find information about these things so I won’t have to bother you nice forum folks with my problems.

In general, I’d be thankful for any additional info on how to translate my knowledge of scripting in the thispatcher context into a js one. I know and use some nice javascript resources like CoreGuideJS15 and, but they’re of little help when it comes to how javascript interfaces with Max.

May 4, 2007 at 2:58pm

I’m sorry, I didn’t even know there’s a dedicated javascript forum. I’ll look at some posts there, and maype repost this thread thereif I don’t find what I’m looking for.

Still, if anyone decides to make a reply in this thread, there’s nothing I can do to prevent that ;-)

May 8, 2007 at 5:01pm

Moving this thread to JavaScript…


You must be logged in to reply to this topic.