sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #18978
[Question #231577]: Problem with "with Region()" workaround
New question #231577 on Sikuli:
https://answers.launchpad.net/sikuli/+question/231577
First of all, I am not a programer, it is just a hobby, so if problem is trivial, I am sorry...
I have problem with following code:
reg = Region(3,542,612,309)
regFind = reg.findAll(Pattern("img1.png").similar(0.50))
with regFind as mm:
while mm.hasNext():
click(mm)
if exists("img2.png"):
reg2 = Region(436,188,337,527)
if reg2.inside().exists(Pattern("img3.png").similar(0.85)):
click(getLastMatch())
if exists(Pattern("img4.png").targetOffset(181,0)):
click(getLastMatch())
mm.next()
it exits with "org.sikuli.script.Finder' object has no attribute '__exit__'" .
I found similar issues:
https://answers.launchpad.net/sikuli/+question/144845
https://answers.launchpad.net/sikuli/+question/139625
But suggested workarounds doesn't solve my problem.
I tried to encapsulate with Region() but without result...
If someone have an idea how to deal with it, please share
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.