ZBrushCentral

Dos commands

Hi :slight_smile:

Can Zscripts issue dos commands? If so can the dos commands have command line arguments? (-h or/h or\h) I am trying to execute and external dos command from Zbrush to load a text file into [GNU Aspell](http://aspell.sourceforge.net/) (Free open source spellchecker). the command would be something like, Aspell textfilename.txt after the command is issued i am going to have the script re-load the text file into the Zbrush notepad... this would be cool to add to marcus Notepad Zscript too!

actualy the command would be something like
…\program files\aspell\aspell TextFileNameHere.txt

well, I guess i can set Aspell global enviornment variable, so that Aspell is in my path=

When we get access to the Zscript SDK and are able to link Zscripts with calls to a dll you will be able to write such an animal. Hopefully this information will be available after the next release.

Meanwhile, it is possible to write to a file with Zscripts which then you could externally open that file in another program.

Great, thanks Digits :slight_smile:

cant wait for the SDK release… I bet there are a bunch of other useful utilitys launched when this happens :slight_smile:

Have a good day :slight_smile:

So you can’t call out to external functions in a dll yet?

Bummer. That sort of ruins my plans for a 3dZText plugin.

If you know how to pass data to a particular dll, or write a special dll, you can using the FileExecute command.

That might work. One downside though would be the picking of the font though. Although you could do that in the program that you launch. Hmmmm…

So the script could launch the program. You pick your font, formatting etc… and type in your text. The program could save it to an image file. Zbrush script could then load the image file and alpha skin it.

I could have the java program written pretty quickly, which would have the advantage of working on both Windows and the Mac.

After checking out the command reference, it looks like the FileExecute is there to invoke functions in a DLL.

Looks like there’s some info on that here…

http://www.zbrushcentral.com/zbc/showthread.php?t=24066&highlight=FileExecute

Now, all I need is some free time.

DOH!

The [FileExecute,…] command is not restricted to just calling functions of a .DLLs. It can also be used to start a program with a command line parameter. In fact you can also call a batch file (.BAT on a PC) that can do things you cannot currently do with ZScripting (Creating directories, deleting files, etc).

If you need to dynamically create a batch file you can do so with the memoryblock commands. Simply create a memory block large enough to contain your batch commands, write your commands to the memory block, save the memoryblock to a file and envoke it with the [FileExecute,…] command.

I am not sure what the PC .BAT file equivalent is on a MAC, does anybody know?

I am not sure what the PC .BAT file equivalent is on a MAC, does anybody know?

well, in Linux it is .sh and .s … wonder if OSX allows the same type of scrpits.