Text window management in a macro
Posted by Simon Roussel on Mar 12, 2007; 11:34am
URL: http://imagej.273.s1.nabble.com/Text-window-management-in-a-macro-tp3700049.html
Hi,
Within a macro, I would like to retrieve all non image windows opened.
I cannot figure out how do do this.
For images I can use:
titles = newArray(nImages);
for (i=1; i<=nImages; i++) {
selectImage(i);
titles[i-1]=getTitle;
print(titles[i-1]);
}
I can also activate a text window if I know its name:
selectImage(id) or selectWindow("name")
but how can I list non-image windows opened (which I can find listed under
the Window menu, above the list of images).
If it is not possible, I would suggest new macro functions like:
nWindows (returns nImages+ number of other windows opened).
and selectWindow() with a possibility to pass "id" as an argument (requires
that non images also have an id), would be something very nice, and usefull ....
Thanks
simon