ZBrushCentral

Launch app from zscript without specifying file

Hi is there any chance i can start application without specifying file to open ?

I actually use LaunchAppWithFile function to edit texture in photoshop.
But im working on way to override the situation when my zscript is losing control after launching DecimationMaster script.
I have set trigger to my automation software which is waiting for decimation procces to appear but im not satisfied with this solution i would like to be able to just LaunchApp to run automation script compiled to *.exe which would run another zscript after decimationmaster finish job.

Regards
Piotr

Did you try ZApp Link?

If you’re using the ZFileUtils then all you need to do (at least on Windows, I’d need to check that this works on Mac OSX) is specify the full path to the application instead of the file parameter, like this:

[VarSet,dllPath,“MyPluginData\ZFileUtils.dll”]
[VarSet,appPath,“C:\Windows\System32
otepad.exe”]
[FileExecute,[Var,dllPath],“LaunchAppWithFile”,#appPath]

For your separate [Windows] application, you can launch ZBrush with a zscript like this C++ code:

#include <windows.h>

static const char *zbrushFolder = “C:\Program Files (x86)\Pixologic\ZBrush 4R6”;
static const char *zbrushExe = “zbrush.exe”;
static const char *scriptPath = “ExportOBJs.txt”; //if just a file name then ZBrush will look in the default location ‘ZScripts’
//otherwise place outside ZBrush root folder and use full path

int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
ShellExecute(NULL, “open”, zbrushExe, scriptPath, zbrushFolder, SW_MINIMIZE );
return 0;
}

HTH,

Finally found this old post which may or may not be pertinent. The one script bit…
http://www.zbrushcentral.com/showthread.php?188195-export-OBJs-with-automatic-increments&p=1098962&viewfull=1#post1098962

Thanks Marcus!
It’s what I was looking for


Piosio