ZBrushCentral

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

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

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 :slight_smile:

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.