Notifications
Clear all

[Closed] Is it possible to run max script in javascript code?

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?

7 Replies

absolutely
( 1 )
( 2 )

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.

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

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

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

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.