Running multiple commands from one button


#1

It seems as though I can’t use the -command flag more than once per button. Is there a way to run multiple commands with one click? I’m trying to select a layer, then edit its properties, select a different layer, and so on.


button 
		-label "Ok" 
		-width 100
	-command "editRenderLayerGlobals -currentRenderLayer Beauty;"
	("window -edit -visible 0 $window");

is there a way to create seperate routines that can be called?


#2

button -command ("editRenderLayerGlobals -currentRenderLayer Beauty[b];[/b]window -edit -visible 0 "+$window+";");


basically you can have a button execute two command strings by specifying the diff commands as part of a single string, each seprated by a ;

:slight_smile:


#3

Excellent! Thanks.

Does this work for n number of commands in the string?


#4

yes it should. as long as the commands are separated with a ;

:slight_smile:


#5

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.