'Option for SelectWindow("") on Java to select the last window that was opened instead of a fixed file name?

I run a Marko Code for microscopy pictures which involves the creation of new windows within my imaging program.

To continue execution, it uses the command: selectWindow("Image")

Since I have a predetermined file name within the bars, I have to rename the file each time to "Image" for it to work. Do you know if there's a way to code the command selectWindow so that it just takes - e.g. - the last window that was opened?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source