Hi Everyone,
I actually figured it out on my own. Adding this line kept all image windows open during the macro run:
setBatchMode(false); // show all images
And then this at the end closed all of them before the next iteration of the function:
while (nImages>0) { //closing all open images
selectImage(nImages);
close();
}
I found these both here:
https://imagej.nih.gov/ij/developer/macro/functions.html#runHope this helps someone in the future!