Is it possible to run max script in javascript code?


#1

I saw this code pice on web.

and Intresting in this line

max.runMaxscript(scr);

So is it possible ? run max script in javascript code?


#2

absolutely
( 1 )
( 2 )


#3

Yeh~~ I saw it. the approach is load scripts as string. and execute it in max.

I really want is the maxscript code run in the javascript or some where and only the result display in max. :sunglasses:


#4

javascript is the language. It has absolutely different code syntax etc…
How is it gonna interpret and execute maxscript code?


#5

No need to load anything. You just send an ajax request from webbrowser to running http server and it executes payload in max.


#6

thanks for your help. and this method needs start a web server in max ?


#7

If you plan to use browser you’ll need it anyway.
You can also have a standalone app running server and whenever it receives a request it passes it further to a particular max instance.

Check out this and this one if you’re interested how to pass-n-execute scripts to max / multiple instances of max.
None of these projects use http server to receive input, but may be useful as the example of how to dispatch scripts to max.


#8

http://www.scriptspot.com/3ds-max/scripts/dimension-maxscript