1. #1
    Senior Member User Gallery
    Join Date
    Jun 2003
    Location
    Hawaii,USA
    Posts
    1,765

    Default Dos commands

    Hi

    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 (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=
    For Hire.

  2. #2
    Senior Member User Gallery
    Join Date
    Apr 2001
    Location
    In the Ozone
    Posts
    2,280

    Default

    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.

  3. #3
    Senior Member User Gallery
    Join Date
    Jun 2003
    Location
    Hawaii,USA
    Posts
    1,765

    Default

    Great, thanks Digits

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

    Have a good day
    For Hire.

  4. #4
    Senior Member User Gallery
    Join Date
    Nov 2004
    Location
    Ohio
    Posts
    1,775

    Default

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

    Bummer. That sort of ruins my plans for a 3dZText plugin.
    Long dead links removed...

  5. #5
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,635

    Default

    Quote Originally Posted by billrobertson42
    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.

  6. #6
    Senior Member User Gallery
    Join Date
    Nov 2004
    Location
    Ohio
    Posts
    1,775

    Default

    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.
    Long dead links removed...

  7. #7
    Senior Member User Gallery
    Join Date
    Nov 2004
    Location
    Ohio
    Posts
    1,775

    Default

    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/sho...ht=FileExecute

    Now, all I need is some free time.

    DOH!
    Long dead links removed...

  8. #8
    Senior Member User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    40
    Posts
    2,464

    Default

    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?
    Mark

  9. #9
    Senior Member User Gallery
    Join Date
    Jun 2003
    Location
    Hawaii,USA
    Posts
    1,765

    Default

    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.
    For Hire.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •