Posted by
nhasan on
Nov 13, 2019; 5:30pm
URL: http://imagej.273.s1.nabble.com/expected-in-line-20-but-all-parentheses-are-there-in-the-code-Pls-help-tp5022674.html
Hi All
I am not very experienced in writing macros, so I used the macro recorder
to create a simple macro (code below). However, when I run it, I get this
error that says ")" expected in line 20. i double-checked the code, but
seems like all the brackets/parentheses are accounted for in the code. Any
suggestions? Really appreciate the help!
run("Open...");
title=getTitle()
selectWindow(title);
run("Split Channels");
selectWindow(title+" (blue)");
close();
selectWindow(title+" (green)");
close();
selectWindow(title+" (red)");
run("16-bit");
run("Duplicate..."," ");
selectWindow(title+" (red)-1");
setAutoThreshold("Default dark");
//run("Threshold...");
setThreshold(51, 254);
//setThreshold(51, 254);
setOption("BlackBackground", true);
run("Convert to Mask");
run("Watershed");
//line below giving ")" expected error
run("Set Measurements...", "area mean standard min limit redirect=[title+ "
(red)"] decimal=3");
run("Analyze Particles...", "pixel show=Outlines display clear summarize");
selectWindow(title+ " (red)");
close();
selectWindow(title+ " (red)-1");
close();
--
Sent from:
http://imagej.1557.x6.nabble.com/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html