Background
Hello,
I want to get the string or boolean from the dialog.
from ij import IJ
from ij.gui import GenericDialog
from fiji.util.gui import GenericDialogPlus
num = 2
if num == 1:
print("hi")
else:
gdp = GenericDialogPlus("test")
gdp.addChoice("Are you sure to analyze?",["YES","NO"],"NO")
gdp.showDialog()
AAA = gdp.getChoices()
print(str(AAA))
#> [java.awt.Choice[choice14,164,47,51x22,invalid,current=NO]]
I would like to get a simple result, but I can’t get it. (e.g. “YES”, “NO” or “True or False”).
Is there any way to get result with out using regex?.
I’m using “GenericDialogPlus” because I want to include dialogs in my if statements, but I would like to use this if possible.
Apologies in advance if this is covered elsewhere, can’t find it easily. Thanks,