Login  Register

Re: Macro command to bring "threshold" window to the foreground.

Posted by Wayne Rasband on Jun 09, 2009; 4:11pm
URL: http://imagej.273.s1.nabble.com/Macro-command-to-bring-threshold-window-to-the-foreground-tp3692213p3692214.html

On Jun 8, 2009, at 6:34 PM, Adam Hacking wrote:

> Hi,
>  
> is there a command like selectImage() for non-image windows ?

Use the selectWindow() macro function to bring a window to the
foreground and use isOpen() to test to see if it is open. Here is an
example that brings the "Threshold" window to the front if it is open
or opens it if it is not open.

    if (isOpen("Threshold"))
        selectWindow("Threshold");  // bring to front
    else
        run("Threshold...");  // open

-wayne