the recording of macro parameters fails under certain configurations. For instance the command run(“Close All”) prevents from recording the macro parameters. In fact it seems to be the case for any macro with a run command in it. It was not like this in the past.
#@ String (label="Hello world") tmp
is recorded correctly as as run("script:C:\Users\apoliti\Downloads\record_example.ijm", "tmp=[you are welcome]");
I tried to adapt the regression test with your example script, @apoliti, but it seems the recorded arguments at that stage are all correct, no matter if the run("Close All"); command is present or absent.
For those who want to dig deeper (and for my future self), see also this javadoc comment in the source:
The issue also doesn’t seem specific to ImageJ1 (i.e. ij.jar) alone, as downgrading to 1.52 of 1.51 didn’t fix the problem in my tests. So we’ll have to look somewhere in imagej-legacy or ij1-patcher.
Yes, thanks for clarifying. I observed the same: any run(...) command will trigger the behavior of what I think could be “premature recording”, before the MacroRecorderPostprocessor had a chance to collect the parameters. Maybe @hinerm or @ctrueden can help digging for the cause?