Dear all,

depending on the individual situation there may be another approach, that I've just discovered.

It is possible to individually set which dialog items are recorded by first resetting the default record string per

  Recorder.resetCommandOptions();

and then individually constructing the desired record string per

  Recorder.recordOption( "CheckBox-state" );
  Recorder.recordOption( "myNum", "NumericField entry" );
  Recorder.recordOption( "which", "Choice" );
  etc.

Of course we need

  import ij.plugin.frame.Recorder;


At least for now this works for me (until I'll perhaps realize any deficits).

Regards

Herbie

::::::::::::::::::::::::::::::::::::::
Am 29.04.26 um 16:46 schrieb Gluender:
Dear Michael,

many thanks for your immediate reply and the suggestion!

The approach may require some work ("get...", DialogListener) but it is doable.

Thanks for the link as well. As you know, more recently and for other reasons I had a look at the ij.plugin.HyperStackConverter code.

Thanks again

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 29.04.26 um 16:26 schrieb Michael Schmid:
Hi Herbie,

in a GenericDialog, you can add a panel with Components that are not handled by the GenericDialog itself.

For these items, you can't retrieve the values (or status) with GenericDialog methods like gd.getNextNumber(); you have to do it with the "get..." method of the Component added. Also, a DialogListener of the GenericDialog (if any) won't be called, you have to register the appropriate listener (if required).

An example are the 'auto' checkboxes of Image>Stack>Stack to HyperStack; the code is in ij.plugin.HyperStackConverter,

https://github.com/imagej/ImageJ/blob/master/ij/plugin/HyperStackConverter.java
(line 182–282)


Michael
________________________________________________________________
On 29.04.26 14:35, Gluender wrote:
Dear experts,

is it possible (and if yes, how) to _exclude_ certain items of a GenericDialog in a plugin-code from Macro-recording?

Any ideas?

Regards

Herbie
:::::::::::::

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


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

Reply via email to