ZBrush can be launched from a BAT file provided the full path is used:
Code:
@echo off
start "" "C:\Program Files (x86)\Pixologic\ZBrush 4R2\ZBrush.exe"
The DefaultZScript.txt (\Pixologic\ZBrush 4R2\ZScripts\DefaultZScript.txt) runs on startup, so you can use that either to carry out commands directly or launch another zscript (which may be easier to manage). For example, if you edit the DefaultZScript like this:
Code:
//startup
[If,1,
[FileNameSetNext,"DoItZScript.txt"]
[IPress,ZScript:Load]
]
[pd]
it will then launch a zscript named "DoItZScript.txt" which resides in the same folder. That zscript might contain code something like this:
Code:
[If,1,
[IPress,Tool:PolyMesh3D]
[FileNameSetNext,"C:\Program Files (x86)\Pixologic\ZBrush 4R2\ZExportImport\PolyMesh.OBJ"]
[IPress,Tool:Export]
[IPress,CLOSE]
]
which will export the PolyMesh3D Star, then close ZBrush. (Note that in the above example the code is wrapped in an [If...] statement that is always true so that second level commands can be used without the need for a button container.)
Note also that you cannot run or set options for another plugin/zscript from within a zscript without control passing to the second plugin/zscript. In other words, you can't get your script to, for example, assign UVs using UV Master then export maps using MultiMapExporter.
HTH,