ZBrushCentral

How to.....

1.- In the zscript command reference is: <zscriptinsert,> how this work:
a.-I have to put this instruction where i want to run the next script?b
b.-Have i to copy and paste the new zscript in the place where is this instruction or just have to be in the same folder where i have the actually zscript running?

2.-In the zscript command reference is: [IShowactions,show actions?]
a.-Where this instruction MUST put?
b.-If I put this instruction or command, also i need to put the notes for each action?
c.-Are complementary?

Thanks in advance

Andreseloy

Hi Andre,

question 1. Let’s say you have two scripts: ScriptA.txt and ScriptB.txt and you want to insert ScriptB.txt…

All you have to do is create a command in ScriptA.txt at the point of insertion using:

<ZscriptInsert,ScriptB.txt>

When you run ScriptA.txt it will execute ScriptB.txt each time it reaches the ZscriptInsert command. This only works with .txt scripts, not .zsc.

question 2. You might try these commands to turn ShowActions on and off:

[IPress,ZSCRIPT:ShowActions] turns it on… and of course,
[IUnPress,ZSCRIPT:ShowActions] turns it off.

Experiment with it to see what it gives you.

Add your own notes to your script using the Note Command. In its simplest form it would be…

[Note,“Hello, please read this note.
Click mouse-button to continue…”]

which displays the message (
continues on a new line) and waits for a mouse click or a keypress.

Does any of this help?

Sven

Sven

I will try and then i post some results¡
Thanks my friend¡
Invasor of your master field¡¡
Andreseloy

1.-The show actions works fine

2.- The <zscriptinsert,> instructions dont work, i put <zscriptinsert,scriptB> to run a script whos name is scriptB and dont work.
What im doing wrong?
Thanks in advance
Andreseloy

Hi A,

Did you include the extension .txt ?

Is ScriptB.txt in the same directory?

Sven

yes, i put the extension txt and in the same folder.
the <zscriptinsert,"".> must be and the end of the script? or could be in the place you want to run it?
Thx
Andreseloy

Hi Andre,

Here are sample scripts using <zscriptinsert> command:

ScriptA.txt:


// ScriptA.txt

[IButton,"script test","inserts ScriptB.txt in ScriptA.txt",

	[Note,"\C00d000This is ScriptA.txt"]

	<zscriptinsert,ScriptB.txt>		// this loads the second script

	[Note,"\C0000d0This is ScriptA.txt again",,2]

]

and ScriptB.txt:


// ScriptB.txt

[Note,"\Cd00000 Now this is ScriptB.txt"]

Sven

[edit: Here’s a tip… When you are working on a zscript, ZBrush tries to help you understand exactly where your zscript is broken.

When you test your zscript and it doesn’t run, ZBrush tries to show you the first line where it thinks the problem is. It shows you an error message which first lists the partial line of code it is having trouble with, then shows the entire line (and sometimes surrounding lines) where the problem code was found. If you scroll through the code in the ZScript window (beyond the problem command) the color-coded text usually turns black.

Use this informantion from ZBrush to review your own zscript text to see if your can correct the syntax.

Sometimes the error ZBrush shows isn’t the real problem. You may have a missing bracket or wrong punctuation somewhere else.

So. Start debugging by looking at the place in your zscript that ZBrush suggests is wrong. Then gradually expand your search, looking at code directly before and directly after that place in your zscript and eventually you will find the problem.] :wink:

:+1:
Andreseloy