sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #33789
[Question #269440]: Sikulix 1.1.0 Onchange-problem
New question #269440 on Sikuli:
https://answers.launchpad.net/sikuli/+question/269440
I am trying to do the following:
find a menu, open it and using the onchange-event get the menu Point using the text() function.
Unfortunately my code doesn't work as expected:
import org.sikuli.script.TextRecognizer as TR
Settings.OcrReadText = True
Settings.OcrLanguage = "deu"
TR.reset()
def changed(event):
print "something changed in ", event.region
for ch in event.changes:
ch.highlight(5) # highlight all changes
r = getLastMatch()
menustring = r.text()
menustring = menustring.replace(" ", "")
print menustring.encode("utf-8")
onChange(500, changed)
observe(background=True)
try:
z = "Fenster"
match = findText(z)
match.highlight(1)
menu = match.getTarget()
menu.click()
pass
except FindFailed:
pass
wait(30)
stopObserver()
Does anyone have what could be wrong?
Cheers!
Xenofon
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.