ImageJ window - Always on Top!

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

ImageJ window - Always on Top!

ved sharma-2
Hi,

Is there a way to keep the ImageJ main window "always on Top" of other
applications in Windows XP?

Thanks,

Ved
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

Wayne Rasband
On Sep 4, 2008, at 3:30 AM, Ved Sharma wrote:

> Hi,
>
> Is there a way to keep the ImageJ main window "always on Top" of other
> applications in Windows XP?

You can do this using a one line Javascript program (requires ImageJ
1.41):

     IJ.getInstance().setAlwaysOnTop(true);

To test it, copy the line above to the clipboard, switch to ImageJ,
type shift+n (File>New>Text Window), type ctrl+v (Edit>Paste), then
type ctrl-j (Macros>Evaluate Javascript). Use the Edit>Zap Gremlins
command if you get an "illegal character" error.

To create and "Always on Top" command, save the script in the plugins
folder as "Always_on_Top.js", restart ImageJ and there will be an
"Always on Top" command in the Plugins menu.

To have ImageJ run this command when it launches, add the following to
the beginning of the ImageJ/macros/StartupMacros.txt file:

    macro "AutoRun" {
       run("Always on Top");
   }

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

Christian Lutz
Am 04.09.2008 um 15:37 schrieb Wayne Rasband:

> On Sep 4, 2008, at 3:30 AM, Ved Sharma wrote:
>
>> Hi,
>>
>> Is there a way to keep the ImageJ main window "always on Top" of  
>> other
>> applications in Windows XP?
>
> You can do this using a one line Javascript program (requires ImageJ  
> 1.41):
>
>    IJ.getInstance().setAlwaysOnTop(true);
>
> To test it, copy the line above to the clipboard, switch to ImageJ,  
> type shift+n (File>New>Text Window), type ctrl+v (Edit>Paste), then  
> type ctrl-j (Macros>Evaluate Javascript). Use the Edit>Zap Gremlins  
> command if you get an "illegal character" error.
>
> To create and "Always on Top" command, save the script in the  
> plugins folder as "Always_on_Top.js", restart ImageJ and there will  
> be an "Always on Top" command in the Plugins menu.
>
> To have ImageJ run this command when it launches, add the following  
> to the beginning of the ImageJ/macros/StartupMacros.txt file:
>
>   macro "AutoRun" {
>      run("Always on Top");
>  }
>
> -wayne


Hello,

some years ago, I used windows and I remember, that in the case you  
having installed a NVIDIA card, that there was an option to
set in the setup, so you could use it similar to linux. (Shortcut)

(eg. select window, press shortcut -> window stays on top)

christian
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

ved sharma-2
In reply to this post by ved sharma-2
Hi Wayne,

Thanks, your method works!

In addition to ImageJ window, I also have an ActionBar window with my
favorite shortcuts. Is there a way to make that window "always on top" as well?

-Ved
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

jmutterer
Ved,
I will send you the latest version of Action Bar that allows this by
including a <onTop> tag in the description file.
Jerome

On Fri, Sep 5, 2008 at 12:14 AM, Ved Sharma <[hidden email]> wrote:

> Hi Wayne,
>
> Thanks, your method works!
>
> In addition to ImageJ window, I also have an ActionBar window with my
> favorite shortcuts. Is there a way to make that window "always on top" as
> well?
>
> -Ved
>
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

Angelika Erhardt
In reply to this post by ved sharma-2
Hi, Wayne,

I have already learned a lot just by reading the emails from the ImageJ Newsgroup.
The question below is also interesting for me. However, I need some detail (I am probably too
new to ImageJ to  know it)
I run ImageJ 1.4.1 as an application - where do I put the Javascript line you mentioned?
>      IJ.getInstance().setAlwaysOnTop(true);

Thanks
Angelika

> > Is there a way to keep the ImageJ main window "always on Top" of other
> > applications in Windows XP?
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

jmutterer
Angelika,
Starting with ImageJ 1.41g, you can create a new javascript with the
Plugins/New/JavaScript command that open a new javascript editor.

Type or paste the javascript there, and run it using the Macro/Evaluate
JavaScript command or typing ctrl+J

Jerome

On Sun, Sep 7, 2008 at 11:50 AM, A. Erhardt <[hidden email]> wrote:

> Hi, Wayne,
>
> I have already learned a lot just by reading the emails from the ImageJ
> Newsgroup.
> The question below is also interesting for me. However, I need some detail
> (I am probably too
> new to ImageJ to  know it)
> I run ImageJ 1.4.1 as an application - where do I put the Javascript line
> you mentioned?
> >      IJ.getInstance().setAlwaysOnTop(true);
>
> Thanks
> Angelika
>
> > > Is there a way to keep the ImageJ main window "always on Top" of other
> > > applications in Windows XP?
>
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

Angelika Erhardt
In reply to this post by ved sharma-2
:-)

Works!! Great -- thanks, Jerome!

Angelika
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ window - Always on Top!

karyon
Hello.
I have a troble with setAlwaysOnTop(true) it doesnt work with IJ.getImage().
I whant to make Always on Top not only ImageJs main window but every window I whant.