Login  Register

Re: Control of events in a macro?

Posted by Pedro J CamelloDr Pedro J Camello on May 05, 2015; 8:55pm
URL: http://imagej.273.s1.nabble.com/Control-of-events-in-a-macro-tp5012702p5012726.html

Dear Kees,

thanks for your help.

The problem with your code is that it passes the boolean after closing the dialogue; my intend was to change the number of an input box before closing the dialogue

Dialog.create("Checkbox");
        Dialog.addCheckbox("test", true);
        Dialog.addNumber("interval", 15); // A number input with a 15 as default that should change to 0 if I un-click the checkbox
Dialog.show();
test = Dialog.getCheckbox();
if (test==false)  
       
       //Here a code to change the number default to 0;


Two sequential dialogue boxes would do the job, but I was looking for a more simple way....

Pedro

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