Check if a window exist or not

Hi,
I am wondering if there is a macro command to tell if a window name exist or not.
Thanks

isOpen("window name") 

Returns true or false (https://imagej.nih.gov/ij/developer/macro/functions.html).

For example:

if (isOpen("Log")){

	selectWindow("Log");
	run("Close");
}
3 Likes

An easier way to close the Log window is to use

close("Log");
2 Likes