Intalling a working macro in Fiji



I have a macro working in the script editor under ImageJ 2.0.0-rc-61/1.51n (Fiji).

I used Plugin/Macro/Install command to install this macro :

#@File(label = "Output directory", style = "directory") output

// Destination path

It installed in the Plugin/Macro menu.

When I launch my macro, I get a “Macro Error” window :

Statement cannot begin with ‘#’ in line 1.
<#>@File(label = “Output directory”, style = “directory”) output

Moreover, this installation disappears when I restart Fiji.

What can I do?

Thank you.

Saved macro not appearing in Plugins menu

The Plugins > Macro > Install… command is an ImageJ 1.x command that doesn’t support (yet) the SciJava script parameter syntax (#@) that was introduced with ImageJ2.

Simply save your macro in a subfolder of ./ (e.g. ./ and it will appear in the respective menu (e.g. Plugins > MyScripts > My Macro) upon restart of Fiji.


Thank you imagejan : it works!



Should we (i.e. - me) update this section of the wiki with that info? We describe this in our workshops… but I don’t think that info lives anywhere else on the wiki.

Just give me thumbs up/down - and I’ll go ahead and edit that section.

eta :slight_smile: