Login  Register

Macro Help

Posted by NoobCoder on Jun 22, 2010; 3:49pm
URL: http://imagej.273.s1.nabble.com/Macro-Help-tp3687635.html

I am creating a macro to streamline a process for an experiment I am running. I want the macro to open a folder and get the list of all .TIF files then process them (Make binary + Analyze Particles). Then save the files as the file name + .txt in the folder.

I am not a coder, but I have been given this task, so I need your help. When I run my macro I receive a message stating "Undefined variable in line 2." Where am I going wrong?

---------------------------------------------------------------------------

getFileList("C:\\Documents and Settings\\barry\\Desktop\\Styler's stuff");
   for (i=0; i<list.length; i++)
   {
        if (endswith (list[i], ".TIF")
        {
                run("Make Binary");
                run("Analyze Particles...", "size=150-Infinity circularity=0.00-1.00 show=Outlines display clear include summarize record add");
                saveAs("Measurements", list[i]+ ".txt");
        }
}

---------------------------------------------------------------------------