Working with macros from command line

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

Working with macros from command line

Juanjo Vega
Hello everyone,

I'm trying to run a macro at imageJ startup, but I always get the same
message:"Macro or script not found".

My macro is located at [HOME]/imageJ/macros directory, and the way I try
to run it is:

java -Dplugins.dir=[HOME]/imagej/plugins/ -jar [HOME]/imagej/ij.jar
-macro macro.txt

I can only make it work if I'm at imageJ directory and run:

java -jar ij.jar -macro macro.txt

As it seems that imageJ can't find the macros directory, I tried to look
for something like the "-Dplugins.dir" option but for macros, but it
seems that there is nothing for that.

Can anybody helpo me, please?

Sincerelly,

Juanjo.
Reply | Threaded
Open this post in threaded view
|

Re: Working with macros from command line

Juanjo Vega
Hello,

Finally I found a way to fix my problem with macros: just add the full
path to the macro parameter:

... -macro <full_path_to_macro_dir>/my_macro.txt

So easy... =)

Sincerelly,

Juanjo.

On Mon, 2010-08-30 at 14:29 +0200, Juanjo Vega wrote:

> Hello everyone,
>
> I'm trying to run a macro at imageJ startup, but I always get the same
> message:"Macro or script not found".
>
> My macro is located at [HOME]/imageJ/macros directory, and the way I try
> to run it is:
>
> java -Dplugins.dir=[HOME]/imagej/plugins/ -jar [HOME]/imagej/ij.jar
> -macro macro.txt
>
> I can only make it work if I'm at imageJ directory and run:
>
> java -jar ij.jar -macro macro.txt
>
> As it seems that imageJ can't find the macros directory, I tried to look
> for something like the "-Dplugins.dir" option but for macros, but it
> seems that there is nothing for that.
>
> Can anybody helpo me, please?
>
> Sincerelly,
>
> Juanjo.