Macro Recorder misses options in run(cmd, options)
Posted by
Hidenao IWAI on
URL: http://imagej.273.s1.nabble.com/Macro-Recorder-misses-options-in-run-cmd-options-tp5024404.html
Dear all,
The following PlugIn does not be recorded correctly on Macro Recorder. It missed options in run(command, options).
However the options can be recorded if IJ.run("Misc...", "divide=0.0") is placed after gd.getNext**() in the java-code.
Is this bug ?
Best
Hidenao Yamada
Java code
-------------------------------------------------------------
import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;
import ij.plugin.frame.*;
public class NoRecord_Plugin implements PlugIn {
public void run(String arg) {
String str="";
GenericDialog gd = new GenericDialog("Test");
gd.addStringField("Input: ", str, 10);
gd.showDialog();
if (gd.wasCanceled()) return;
IJ.run("Misc...", "divide=0.0");
str = gd.getNextString();
//IJ.run("Misc...", "divide=0.0");
IJ.showMessage("Is the options recorded in Recorder ?");
}
}
-------------------------------------------------------------
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html