Re: Control of events in a macro?
Posted by
Krs5 on
May 06, 2015; 7:44am
URL: http://imagej.273.s1.nabble.com/Control-of-events-in-a-macro-tp5012702p5012729.html
Dear pedro,
So if I understand it well the number input for interval has not to be changed by the user and would only have 2 option 15 or 0? Why put it into a dialog box?
interval = 15;
Dialog.create("Checkbox");
Dialog.addCheckbox("test", true);
Dialog.show();
test = Dialog.getCheckbox();
if (test==false) interval = 0;
print(interval);
Best wishes
Kees
-----Original Message-----
From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Pedro J Camello
Sent: 05 May 2015 21:55
To:
[hidden email]
Subject: Re: Control of events in a macro?
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--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html