Login  Register

Re: command default settings in a macro

Posted by Wayne Rasband-2 on Sep 24, 2019; 3:55am
URL: http://imagej.273.s1.nabble.com/command-default-settings-in-a-macro-tp5022452p5022457.html

> On Sep 22, 2019, at 2:18 PM, F Javier Diez Guerra <[hidden email]> wrote:
>
> Dear listers,
>
> I would like to know how default settings for a given command can be changed within a macro.

Use the Rotate command with the recorder (Plugins>Macros>Record) running and it will generate the needed code:

  run("Rotate... ", "angle=0.4 grid=20 interpolation=Bicubic”);

These settings will be used the next time you use the Rotate command or run the run("Rotate... “) macro.

-wayne


>
> For example, if I run the macro:
>
>     run("Rotate... ");
>
> a window appears with the following default values.
>
> angle = 15 º
> grid lines = 1
> Interpolation = bilinear
> Fill with bacground color = inactive
> Enlarge image = inactive
>
> What I am looking for are the statements I have to include in the macro so that when I run it, a window appears with the following default values?
>
> angle = 0.4 º
> grid lines = 20
> Interpolation = bicubic
> Fill with bacground color = inactive
> Enlarge image = inactive
>
> I`ve been browsing to find an answer but could not find it.
>
> Thanks in advance for your input.
>
> Javier

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