Login  Register

Re: Getting the name of a Text Window in a macro

Posted by Michael Entrup on Jul 01, 2014; 3:08pm
URL: http://imagej.273.s1.nabble.com/Getting-the-name-of-a-Text-Window-in-a-macro-tp5008514p5008516.html

Hi Stein,

here is a small Jython Macro that will print details about all open windows.

     from ij import WindowManager as wm
     list = wm.getNonImageWindows()
     print list

Have a look at [1] to see all methods that are provided by the class
ij.WindowManager.

I don't know how to do this with basic IJ macro code, but I think the
eval function is the clue.

Best regards
Michael Entrup

[1]: http://rsbweb.nih.gov/ij/developer/api/ij/WindowManager.html


Am 01.07.2014 15:31, schrieb Stein Rørvik:

> Does anyone know how to do do this in a macro:
>
> 1)      check if the active window is an image window or a text window or a table window
>
> 2)      get the name (title) of the active text window or table window
> Everything I have tried just ignores text windows and reports the above info from the active image window.
> It is ok for me to use a java snippet as long as it is callable inside a normal macro.
> I can provide examples if this question is unclear.
>
> Stein
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html