How to use ScriptSender.exe?

How to use ScriptSender.exe?

akarcode
Participant Participant
707 Views
2 Replies
Message 1 of 3

How to use ScriptSender.exe?

akarcode
Participant
Participant

I was wondering if ScriptSender.exe can be used or if it is just a leftover from the crypt.

I did find the following source code: https://github.com/ADN-DevTech/3dsMax-SampleCode/tree/master/MaxscriptServer

I did successfully compile the MaxScriptServer. It still partially works but the code is very old and would need some re-writing.
However I don't quite understand why the ScriptSender is still part of 3dsmax (and apparently updated) with the Server being absent... what am I missing? 😶

Is there a recent public maintained MaxScriptServer available? (not Vexus!)
Is there an alternative to send scripts to a running 3dsmax?

0 Likes
Accepted solutions (1)
708 Views
2 Replies
Replies (2)
Message 2 of 3

inquestudios
Enthusiast
Enthusiast

You can set up a callback to look for ms files in some particular folder or get some code via network socket to execute it.
You can use command line keys to start 3ds MAX with some additional script on startup.
And of course you can put your script to startup folder if you want to run it once on every start.
So you don't need any external tools to send some code from outside.

0 Likes
Message 3 of 3

akarcode
Participant
Participant
Accepted solution

Spent a few more hours on this today...

I was trying to send *.ms files instead of executing code. 😑 💀
so basically i can send: "C:\ScriptSender.exe" "print \"Hello\"" to execute code directly.
or execute a *.ms file the following: "C:\ScriptSender.exe" "fileIn \"C:/Scripts/script.ms\""
not sure if that would be a workaround or if it's possible to send a *.ms file directly to be executed.

On the topic of the MaxscriptServer...
Turns out it's possible to start a TCP server from .Net inside 3dsmax which is basically the equivalent of what the old MaxscriptServer Sample code does with QT that I've linked before.

Then I've learned that once the TCP server is running I can just send data directly from a script to the running Server 😂

I found this very old blogpost with an example for anyone stumbling past: https://techarttiki.blogspot.com/2009/12/maxscript-dotnet-sockets-with-python.html
and this old thread with a neat example: https://forums.autodesk.com/t5/3ds-max-programming/unreliable-executed-code-though-dotnet-tcp-server...

0 Likes