set location of ImageJ window at launch by macro?

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

set location of ImageJ window at launch by macro?

Bill Christens-Barry
Is there a way to set the location of the main ImageJ window with an ImageJ macro, and ideally via an AutoRun macro in the StartupMacros file? Where is the location to be used in positioning the ImageJ window at launch stored? I don't find it in the "IJ_Props.txt" file.

Thanks.

Bill Christens-Barry
Reply | Threaded
Open this post in threaded view
|

Re: set location of ImageJ window at launch by macro?

ved sharma
The location, where ImageJ launch window will appear, is saved in the file IJ_Prefs.txt. Look for ij.x and ij.y

I don't think this can be set from a macro.

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

Re: set location of ImageJ window at launch by macro?

Juanjo Vega
Maybe if you create a plugin to set IJ location, so you can call it from your macro (run("plugin", options)):

...
public run(String string){

        int x, y;

        // Parse location from options using:
        // Macro.getOptions();

        ...
        IJ.getInstance().setLocation(x, y);
}



On Sep 26, 2011, at 4:52 AM, Ved Sharma wrote:

> The location, where ImageJ launch window will appear, is saved in the file IJ_Prefs.txt. Look for ij.x and ij.y
>
> I don't think this can be set from a macro.
>
> -Ved

------------------------------------------------------------
Juanjo Vega ([hidden email])

Unidad de Biocomputación. Laboratorio B-13.
Centro Nacional de Biotecnología. CNB-CSIC.
C\ Darwin, 3. Campus de Cantoblanco.
Universidad Autónoma de Madrid.
28049, Madrid, Spain.

http://www.cnb.csic.es
http://www.biocomp.cnb.csic.es

+34 91 585 4510

"Las mejores almas son capaces de los mayores vicios como de las mayores
virtudes, y aquellos que caminan despacio por el camino recto pueden
llegar más lejos que los que corren pero se apartan de él." - Discurso
del Método, René Descartes.
Reply | Threaded
Open this post in threaded view
|

Re: set location of ImageJ window at launch by macro?

Herbie-6
In reply to this post by Bill Christens-Barry
Bill Christens-Barry,

why not consult the "Built-in Macro Functions"?

setLocation(x, y);
getLocationAndSize(x, y, width, height);
screenHeight;
screenWidth;

>Is there a way to set the location of the main ImageJ window with an
>ImageJ macro, and ideally via an AutoRun macro in the StartupMacros
>file? Where is the location to be used in positioning the ImageJ
>window at launch stored? I don't find it in the "IJ_Props.txt" file.
>
>Thanks.
>
>Bill Christens-Barry

HTH
--

                   Herbie

          ------------------------
          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: set location of ImageJ window at launch by macro?

Gabriel Landini
On Monday 26 Sep 2011 10:13:58 Gluender wrote:
> why not consult the "Built-in Macro Functions"?
>
> setLocation(x, y);
[...]

I do not think that you can set the main IJ window using setLocation, which
was what the original question was about.

However this javascript line would do:

IJ.getInstance().setLocation(10, 10);

If you save that line as a .js file then you can call it from a macro with
runMacro().

Cheers

Gabriel