retrieve specific string/number from dialog box

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

retrieve specific string/number from dialog box

mmettlen
If one has a dialog box with multiple strings or numbers, e.g.:

Dialog.create("Values");
Dialog.addNumber("first value", value1);
Dialog.addNumber("second value", value2);
.
.
.
Dialog.show();

Is there a way to extract specific values, i.e. can I somehow get value2 before getting value1?
   
Reply | Threaded
Open this post in threaded view
|

Re: retrieve specific string/number from dialog box

Christine Labno-2
Hello Marcel,

You could assign your getNumber to variables and then call for any variable anytime you want within the macro.  For example:

//your code
Dialog.create("Values");
Dialog.addNumber("first value", value1);
Dialog.addNumber("second value", value2);
.
.
.
Dialog.show();

//plus new code
v1 = Dialog.getNumber();
v2 = Dialog.getNumber();;

print(v2, v1);
print(v1, v2);

Best,
Christine

--------------------------------------------
Christine Labno, Ph.D.
Asst. Technical Director
Light Microscopy Core
University of Chicago
Office of Shared Research Facilities
KCBD 1250 900 E. 57th St.
(773) 834-9040 (phone)

________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of mmettlen [[hidden email]]
Sent: Monday, March 03, 2014 6:56 AM
To: [hidden email]
Subject: retrieve specific string/number from dialog box

If one has a dialog box with multiple strings or numbers, e.g.:

Dialog.create("Values");
Dialog.addNumber("first value", value1);
Dialog.addNumber("second value", value2);
.
.
.
Dialog.show();

Is there a way to extract specific values, i.e. can I somehow get value2
before getting value1?




--
View this message in context: http://imagej.1557.x6.nabble.com/retrieve-specific-string-number-from-dialog-box-tp5006741.html
Sent from the ImageJ mailing list archive at Nabble.com.

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

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