Page 1 of 1

Programmatically run commands?

PostPosted: Fri Sep 04, 2015 9:29 pm
by Justin Ireland
Is it possible to run a command programmatically? For example, if I have commands and parameters stored as variables and then I want to combine them to execute, how would I do that?

Forgive me if this is basic knowledge, I don't have much experience scripting with Widget.

Justin

Re: Programmatically run commands?

PostPosted: Fri Sep 04, 2015 9:45 pm
by Justin Ireland
Passing variables for parameters is pretty straightforward so I guess my main challenge is the function/command call.

Is it possible to edit the contents of a custom script node or action script? I could insert the command string there and then execute it when ready. I'm not sure how to do that though.

Re: Programmatically run commands?

PostPosted: Sat Sep 05, 2015 2:33 am
by JustynR
I either use the VAdd script or the Text Combiner Node to a Variable Output Node.

Either way, you'll have a variable with the combined result you want.

Now create a Custom Script and use:
Code: Select all
VExecuteAsScript,VariableName


And you're set.

You've got to use the text combiner more often than not because of the different type of values you'll need to put in there; often it won't combine properly.

Re: Programmatically run commands?

PostPosted: Sat Sep 05, 2015 7:46 pm
by Justin Ireland
Yes, that's what I was looking for! Thank you.

Justin