[Closed] Run script from command line in already opened 3dsMax window
Quick question for you all:
I know that it’s possible to launch 3dsMax and run a script right afterwards through command line, but I’m wondering if it’s at all possible to do the same, but on an already opened 3dsMax window instead of having to launch a new instance of the application?
I’ve been working on a script for 3dsMax called GoMax, that allows you with a single click to bring a ztool from Zbrush to 3dsMax and vice versa. I’m using somewhat of a ridiculous workaround. In 3dsMax I have basically 2 buttons, one allows me to import an obj to zbrush and the other exports it. I use a little exe file called nircmdc.exe that allows me to switch between applications and press hotkeys from the command line.
So basically what happens is that 3dsMax exports the obj, 3dsmax is minimized, Zbrush is maximized, hotkeys are pressed and my macros in Zbrush starts and imports the obj.
If I want to bring something from Zbrush to 3dsMax, I first need to open 3dsMax, click the button, 3dsMax gets minimized again, Zbrush maximized, hotkeys pressed (the export zscript runs), 3dsMax gets maximized again and the obj is imported. In the moment the button is pressed until 3dsmax is maximized again, it has been waiting for the obj file. I’d much rather like to avoid this, and I would prefer to launch the “import maxscript” from Zbrush through the command line once it’s done.