1

So if I run the the following example (keeping the #@String param1 line at script.groovy):

ImageJ-win64.exe --headless --ij2 --console --run script.groovy "param1='value1'"

the param1 is available through the script.groovy code (as expected..)

But if i run it again without the parameters

ImageJ-win64.exe --headless --ij2 --console --run script.groovy

The param1 (which was not passed this time..) will still be available with the same value?!?!

Is this behavior expected?!

tanovsky
  • 73
  • 5
  • For future reference, add `persist=false` to your script params. E.g. `# @String(persist=false, label="I am a label") my_cool_parameter` – joost Jul 25 '22 at 17:53

1 Answers1

0

Ups, my bad.. Actually this is the expected behavior as stated in the documentation, in the persistence section at https://imagej.net/Script_parameters . but still not convinced if this default behavior was the best decision...

tanovsky
  • 73
  • 5