1. #1
    Senior Member User Gallery
    Join Date
    Feb 2007
    Location
    Wellington, NZ
    Posts
    157

    Default Simulating User Keystrokes

    Is it possible at all to simulate the user writing something in Zscript ? I read somewhere that you can emulate an ENTER Keystroke but couldn't find anything anywhere. I just want to put a string in a textfield (like the layer rename, create palette etc.)

    Thanks,
    Jens
    Jens Kafitz
    Sr. Texture Artist, Weta Digital


  2. #2
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,328

    Default

    Can you not use [StrAsk] to get the user input?

  3. #3
    Senior Member User Gallery
    Join Date
    Feb 2007
    Location
    Wellington, NZ
    Posts
    157

    Default

    That doesn't help in this case as the user still needs to type something.
    I want to interact with existing Zbrush Name Fields. Say the LayerRename is pressed by script and the Input Field pops up. I just want to type something in there by script, then "press" enter- since I cannot get around the field popping up I need to work with it. StrAsk just gives me another Field the user can type in stuff I don't want
    Jens Kafitz
    Sr. Texture Artist, Weta Digital


  4. #4
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,328

    Default

    Ah, I misunderstood. It isn't possible to rename layers through zscript (believe me, I have tried). You can rename a subtool - you create an empty file with a .dat extension and import it into the subtool; the file name becomes the subtool name. (There is also a new command, [ToolSetPath], in 4R4 for renaming the main tool.)

    I suppose it might be possible to create a dll that simulates the keystrokes. I have tried that also, without success, but that doesn't mean it's not possible.

Posting Permissions

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