That's the way I do it with my plugins.
You'll need to tell ImageJ to start your plugin with the "-macro" parameter. I had some problems because you need to tell it the FULL PATH to your macro, even if it is stored at the macros folder. I mean:
... -macro <IMAGEJ_HOME>/macros/AutoRun.txt
Hope it helps :)
I even managed to pass arguments to my plugins through the macro and from a shell script, it's not hard but a bit tricky, so if you need to do that in the future, just let me know.
Juanjo
On Mar 31, 2011, at 3:05 PM, Michael Ellis wrote:
> You can use the StartupMacros.txt file to automatically run macro commands when ImageJ launches.
>
> See:
http://rsbweb.nih.gov/ij/developer/macro/macros.html>
> Define a macro AutoRun in this file to launch your plugin MyPlugin
>
> macro "AutoRun" {
> showMessage("Hi", "Hello");
> run ("MyPlugin");
> }
>
> Hope this helps
>
> -- Michael Ellis
> On 31 Mar 2011, at 13:44, Amelie Marzin wrote:
>
>> Hi,
>>
>> I am currently writing a plugin for ImageJ. This plugin is like a toolbar from where I launch some other plugins or macros.
>> A great functionality would be to automatically launch my plugin when I start ImageJ. Is there a way to do so?
>>
>> Thanks,
>>
>> Amélie
------------------------------------------------------------
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.eshttp://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.