Login  Register

Re: Shortcuts problem with In [+] command

Posted by Jan Eglinger on Jun 01, 2016; 11:31am
URL: http://imagej.273.s1.nabble.com/Shortcuts-problem-with-In-command-tp5016558p5016569.html

Hi Ondrej,

as a workaround, you can use the following Groovy script (or the
equivalent Javascript or Python code) to install the shortcut via the
ij.Menus class:

***************

     import ij.Menus
     import ij.IJ

     Menus.installPlugin("ij.plugin.Hotkeys(\"In
[+]\")",Menus.SHORTCUTS_MENU,"*In [+]","F1",IJ.getInstance())

***************
(Mind the line breaks introduced by the mailer)

In general, the scripting languages [1] offer more freedom than the
macro language.

Hope that helps,
Jan

[1]: http://imagej.net/Scripting



On 31.05.2016 18:30, Ondřej Šebesta wrote:

> Dear all
>
> I wanted to remap zooming commands to a different keys. I got this line in
> recorder: run("Add Shortcut... ", "shortcut=F1 command=[In [+]]");
>
> however, when I use it in macro, the command "In [+" only is installed and
> is of course recognized nor executed. Correct should be "In [+]".
>
> The problem is likely in looking for the first occurence of ] instead of
> the last one in argument parsing ....
>
> Would be nice to fix this.
>
> Thank you very much.
>
> Ondrej.
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html