trouble with checkbox popup
hello,
i would like to make a popup that pauses the script and waits for the user to select some checkboxes and then continue the script once the user clicks the ok button. just like input() in sikuli only with some checkboxes instead of a textfield. i coded a popup with some checkboxes, but the script continues running instead of waiting for the user to click ok.
i know this is more of a jython/swing question. so, if it would be ok, can you explain to me to how to take a look at the input() function so i can emulate it?
here is the checkbox class that does not make the script wait for the user to click ok:
'''
a window for selecting checkboxes
'''
from javax.swing import (JButton, JFrame, JPanel, JCheckBox, BoxLayout,
from java.awt import BorderLayout
class SelectBoxes(
def tally(self, event):
self.boxes= []
if self.checkbox1.
if self.checkbox2.
if self.checkbox3.
if self.checkbox4.
if self.checkbox5.
if self.checkbox6.
if self.checkbox7.
print self.boxes
def __init__(self):
self.frame = JFrame('Select boxes',
self.button = JButton('ok', actionPerformed = self.tally)
self.show()
def show(self):
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask rob for more information if necessary.