Login  Register

Re: Repeat command within a macro

Posted by Michael Doube on Jul 07, 2010; 9:15am
URL: http://imagej.273.s1.nabble.com/Repeat-command-within-a-macro-tp3687713p3687714.html

Gareth,

Enclosing your commands in a for loop is all you need to do


selectWindow("Result shared pixels");
run("Set Measurements...", "area mean min area_fraction redirect=None
decimal=3");
for (s = 1; s < nSlices(); s++){
        setSlice(s);
        run("Measure");
}

Check out the macro guide and list of macro commands:
http://rsbweb.nih.gov/ij/developer/index.html
http://rsbweb.nih.gov/ij/developer/macro/functions.html

Michael