View Full Version : how to execute multiple commands

10 October 2005, 06:00 AM
Hey all,

I'd like to execute multiple commands with a button in a window. But I don't want to use a procedure. Is there a way that you can for example create a sphere and move it -a 0 5 0 all in the one go without having to make a seperate procedure for it?

This is all I have so far:
button -label "something" -command "sphere"

but i'd like to add something like -command "shere" + "select -r sphere" + "move -a 0 0 0"
obviously.. that doesn't work.

Thanks heaps


10 October 2005, 06:07 AM
window -width 150;
columnLayout -adjustableColumn true;
button -label "Make Sphere" -command "sphere; move -a 10 10 10;";

Keep the commands in qoutes seperated by semi-colons.


10 October 2005, 02:38 AM
if your goign to do a fair bit of work outside of a proc, especially if you'll start using variables, then its good form to incase those commands in braces so -c "{ ming; ling; ling; }", so they keep a local scope rather then broad castign into the global (and ****ign with other scripts!) :)

CGTalk Moderation
10 October 2005, 02:38 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.