Install the macro unsuccessful

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

Install the macro unsuccessful

Xulong Wang
Hi All,

I am trying to write my macro, but confused on the first step, so I wrote
this small macro as below, it runs well. Then I saved it into the plugin
folder as my1stmacro.txt. According to the documents, I have already
installed the macro, and should be able to see it under the plugin submenu,
however I did not, looks I did not install it properly, so the imageJ does
not know this macro. I also tried Plugin/Install Š Did not work neither. I
am able to put this macro into the tool menu and it works well, pretty
convenient. But I am just wondering why I did not install the macro
properly? I think I followed exactly what the document says.

System: Mac Snowpoad. Java, most updated. Thanks in advance.

macro "XL OPEN Action Tool - C902T3f18O" {
dir = getDirectory("Choose Directory ");
list = getFileList(dir);
setBatchMode(false);
  for (i=0; i<list.length; i++) {
     open(dir+list[i]);
  }
}
Reply | Threaded
Open this post in threaded view
|

Re: Install the macro unsuccessful

Michael Schmid
Hi Xulong,

as for plugins, the file with the macro should have at least one
underscore in the name, e.g. my_1st_macro.txt, to list it automatically in
the plugins menu.

For a tool macro, however, the usual procedure is to include it in the
StartupMacros.txt File (ImageJ/macros directory).

Michael

_______________________________________________________________________
On Fri, January 7, 2011 20:48, Xulong Wang wrote:

> Hi All,
>
> I am trying to write my macro, but confused on the first step, so I wrote
> this small macro as below, it runs well. Then I saved it into the plugin
> folder as my1stmacro.txt. According to the documents, I have already
> installed the macro, and should be able to see it under the plugin
> submenu,
> however I did not, looks I did not install it properly, so the imageJ does
> not know this macro. I also tried Plugin/Install Š Did not work neither. I
> am able to put this macro into the tool menu and it works well, pretty
> convenient. But I am just wondering why I did not install the macro
> properly? I think I followed exactly what the document says.
>
> System: Mac Snowpoad. Java, most updated. Thanks in advance.
>
> macro "XL OPEN Action Tool - C902T3f18O" {
> dir = getDirectory("Choose Directory ");
> list = getFileList(dir);
> setBatchMode(false);
>   for (i=0; i<list.length; i++) {
>      open(dir+list[i]);
>   }
> }
>