Login  Register

Variables in Macro Run Commands

Posted by TJ Krall on Sep 17, 2006; 11:28pm
URL: http://imagej.273.s1.nabble.com/Variables-in-Macro-Run-Commands-tp3701580.html

Hello all,

I'm writing a macro in which I'd like to call upon other macros using the run command (i.e. run("Grouped Stack Projector", "group=2 projectionfiltered=[Sum Slices]"); ).  However, instead of using the constant group size or entering the group size in manually each time, I'd like to use a variable.

run("Grouped Stack Projector", "group=variable projectionfiltered=[Sum Slices]");

 However, whenever I do so I get an error saying that the variable is not recognized as a number.  Before the "run" command I've written print(variable); and the number prints to the log window correctly.  I've also parsed the variable to an integer in case it was being stored as a string, which obviously didn't correct the problem. Anyone have any thoughts?


Thanks,
TJ
 
---------------------------------
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail.