Hi everyone!
I have another question regarding part of my code that I cannot seem to sort out.
To preface my question, I’ll provide a paraphrased/shortened form of my code (macro language).
Dialog.addChoice(“choice1:”, newArray(“1”,“2”,“3”);
Dialog.addChoice(“choice2:”, newArray(“1”,“2”,“3”);
c = Dialog.getChoice();
d = Dialog.getChoice();
if (c == “1”) {
// settings
}
else if (c == “2”) {
// settings
}
/*
if (d == “1”) {
// settings
}
else if (d == “2”) { // if I comment out this second section, it works
// settings
}
*/
open(“image”);
if (c == “1”) 1(); else if (c == “2”) 2(); // where 1() and 2() are previously defined functions
When I run one of the functions from user input “c” on its own and comment out the parts for “d”, it runs perfectly fine, but when I do not comment out the parts for “d”, “c” begins to produce completely different results. I am open to any and all suggestions!
(P.S. I have asked so many questions on here as this is my first year using ImageJ, and everyone has been so patient and helpful in answering each and every single one of them, which I am very thankful and grateful for!)
Thanks for your time!
JChen