Posted by
Stein Rørvik on
Jun 10, 2020; 6:36pm
URL: http://imagej.273.s1.nabble.com/installing-macro-properly-tp5023470p5023477.html
What I do is that I create a sub-folder of the plugins folder and just put the macros there. Then the macros will appear in the corresponding sub-folder of the plugins-menu. The name does not need to contain an underscore, and the macro will appear in the menu without the .ijm extension. I think this is easier and gives more control than using the Install... command. I have honestly never understood the purpose of the Install.. command as it appear confusing to me; installing what, where?
Please notice that you can have the folder only one level deep, a sub-folder of a sub-folder will not show up in the menus.
Stein
-----Original Message-----
Sent: 10. juni 2020 18:57
To:
[hidden email]
Subject: installing macro properly?
I apologize for being slow - but the documentation is confusing me. So, I'll pester you with a direct question about my specific problem.
I have a file, "foo_macro.ijm" which looks like:
macro "foo_macro" { ...stuff... }
My usual routine with Java plugins is to use a "plugins.config" file in the .jar file. Typically, I drag&drop the .jar file, select a subfolder under plugins (to keep all my plugins in one place - mostly so it is easy to DELETE all of them when required), and restart FIJI. Works perfectly. The plugins.config file always looks like this:
Plugins>category,"pretty name",className
where "category" is a sub-menu under Plugins where I want "pretty name" to appear, and "className" is the name of the Java Class.
I want to do something similar with this macro, but...
drag&drop of foo_macro.ijm does not install the macro - instead it brings me into the editor so, OK - I'll use Plugins>Install Plugin. Note that I have rarely used this method, so I may completely mis-understand it.
That works about as expected, except:
a) there seems to be no way to select a subfolder of plugins - foo_macro.ijm is installed in plugins.
I would like to put it in plugins/subFolder.
b) I can't seem to get the macro to show up with a sub-menu - it shows up at the bottom, along with Debug and Sandbox and others. I would like it to show up as Plugins>subMenu>foo_macro.
Following the documentation, I tried:
macro "<subMenu> foo_macro" { ...stuff... }
but this had no effect.
What am I doing wrong?
I think I can install the macro manually in a sub-folder (but I don't like to do that myself, and I definitely don't want to tell my colleagues to try to do this themselves).
I have no clue how to get the macro to show up as Plugins>subMenu>foo_macro.
My main sources so far have been the online tutorial and the example macro "MacroSubMenus.txt" - but clearly I'm not understanding them.
Clues?
--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html