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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

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



Reply | Threaded
Open this post in threaded view
|

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

Wayne Rasband
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