Login  Register

run() and Macro Recorder ignoring calls to getBoolean()

Posted by Neil Fazel on Jul 21, 2014; 7:25pm
URL: http://imagej.273.s1.nabble.com/run-and-Macro-Recorder-ignoring-calls-to-getBoolean-tp5008839.html

I often invoke one .ijm macro from within another with help from the Macro Recorder. I first run the called macro interactively, then copy and paste into another macro whatever the Macro Recorder displays in the Recorder window. The Macro Recorder embeds arguments provided interactively by the user in the argument string it passes to the called macro. For example, if the called macro is MyMacro.ijm, and has two getNumber() calls in it to get arg1 and arg2, the Recorder shows this

   run("MyMacro", "arg1=8349 arg2=55");

But any calls to getBoolean() do not show up in the argument list, e.g. something like

   run("MyMacro", "arg1=8349 arg2=55 arg3=true");

is not generated. I tried inserting arg3=true by hand into the run() statement, but it was ignored by the called macro.

It would be nice if run() and Macro Recorder could handle Boolean arguments.

Thanks,
Neil

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