Login  Register

Re: Hiding ImageJ toolbar/panel while running macro from commandline...

Posted by Wayne Rasband on Apr 16, 2009; 4:57am
URL: http://imagej.273.s1.nabble.com/Hiding-ImageJ-toolbar-panel-while-running-macro-from-commandline-tp3692932p3692933.html

> Hi all,
>
> I am trying to distribute a macro to my colleagues. The macro  
> contains a dialog panel with all the required input fields (it is  
> basically a batch process sizing routine using an auto-threshold).  
> Is there a way I can present only the dialog panel and not the  
> imagej toolbar when I run the macro from a commandline?
>
> I am basically using c:\Program Files\Imagej\Imagej.exe -macro  
> "sizemacro.txt", when I run it, I get my macro dialog box, and also  
> the imagej toolbar. Is there a way to suppress the toolbar from  
> being displayed? It is not super essential, I am simply looking to  
> hide all the other processing functionality of imagej from the  
> users and make it look as simple as possible.

You can use JavaScript to move the ImageJ window offscreen.

     eval("js", "IJ.getInstance().setLocation(5000, 5000)");

When the macro finishes it will need to use run("Quit") to exit ImageJ.

-wayne