In recorded macro change the title to work on title ending with

macro
Tags: #<Tag:0x00007fd69c7dcf10>

#1

I guys I’m a beguinner in making Macro so I’ve used the recording setting but I have trouble to change the titles to work on my other images all ending with either “CFOS” or “GAD” like I tried there:

selectWindow(endsWith (CFOS.tif));
run("RGB Color");
run("Split Channels");
close();
close();
selectWindow(endsWith(CFOS.tif (red));
setAutoThreshold("Default dark");
//run("Threshold...");
//setThreshold(0, 130);
setOption("BlackBackground", false);
run("Convert to Mask");
run("Close");
selectWindow(endsWith(GAD.tif));
selectWindow(endsWith(CFOS.tif (red));
run("Add Image...", "image=endsWith(GAD.tif) (red) x=0 y=0 opacity=75");
selectWindow(endsWith(GAD.tif));
close();
selectWindow(endsWith(CFOS.tif)(red)");
close();

but didn’t work obviously. What should I change to make it work?

thanks for your help


#2

Good day Lauriane,

please study the document
https://imagej.nih.gov/ij/developer/macro/functions.html

and perhaps also this one
https://imagej.nih.gov/ij/developer/macro/macros.html

Regards

Herbie