Programmatically run commands?

Moderator: Moderator Group

Programmatically run commands?

Postby Justin Ireland » Fri Sep 04, 2015 9:29 pm

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
Justin Ireland
 
Posts: 14
Joined: Fri Apr 11, 2014 5:58 pm

Re: Programmatically run commands?

Postby Justin Ireland » Fri Sep 04, 2015 9:45 pm

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.
Justin Ireland
 
Posts: 14
Joined: Fri Apr 11, 2014 5:58 pm

Re: Programmatically run commands?

Postby JustynR » Sat Sep 05, 2015 2:33 am

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.
Justyn Roy
Toronto Ontario Canada
JustynR
 
Posts: 560
Joined: Wed Mar 25, 2009 1:33 am
Location: Toronto, Canada

Re: Programmatically run commands?

Postby Justin Ireland » Sat Sep 05, 2015 7:46 pm

Yes, that's what I was looking for! Thank you.

Justin
Justin Ireland
 
Posts: 14
Joined: Fri Apr 11, 2014 5:58 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 23 guests

cron