Installing and applying shortcut to macro

I would like to assign a hotkey/shortcut to a macro I created, but am having trouble. I have saved it in the “plugins” folder but it does not appear when I restart ImageJ/Fiji.

I took a step back and tried to work through the documentation tutorial (Macro Language) but I can’t even seem to get the “Hello World” plugin to appear once I restart.

On a related note, I also noticed that the documentation says to create a shortcut using Plugins>Shortcuts>Create Shortcut but this is not even an option (you can however use Plugins>Shortcuts>Add Shortcut…). So is perhaps the documentation out of date? Appreciate the help.

Indeed, the guide (that was written for version 1.46) is a bit outdated by now.

It seems that these menu commands were changed in these commits:

In the release notes for 1.50a, it just says:

Thanks to Gerald Torgersen, added the Plugins>Shortcuts>Add Shortcut by Name command and removed the obsolete Plugins>Shortcuts>Install Plugin command.

For a script to appear as a menu command, it has to contain at least one underscore (_). In Fiji, the recommended location for saving is actually a subfolder of scripts, not plugins, so for example:

… for it to appear in the menu as Process > My Processing Script.

Once you get that sorted, the Add Shortcut… command should work as advertised.

Another option is to use a macro {} definition which defines its shortcut in the code, and is installable by Plugins > Macros > Install… or in a start-up macro file. See here:

1 Like

Thanks. I don’t seem to have a process subfolder within scripts, but I made one and it looks like it worked!

On a related note, how do people know to put macros in the scripts and not plugins folder? I don’t see how I could have figured that out on my own.

It’s documented here:

Suggestions are welcome to make the information more visible, but note that the wiki is being transitioned to a new website currently, and therefore read-only at the moment.

great thanks, so the .net site is generally up to date (but in the process of being transitioned to a new site), while the NIH site may be out of date?