sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49769
Re: [Question #676840]: Inconsistent behaviour of SIkuli code run
Question #676840 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/676840
Status: Open => Needs information
RaiMan requested more information:
Yes, if the handler is entered, it should run to the end and should
either print True or False, WhY and path.
Is the observe_and_click called from inside a try--except?
Are only True cases missing or only False cases or even both?
Are the prints before (j: 0 ...) and after in case of False (Why + path)
always visible?
To make it clearer, add a print to the start and the end.
def handler(self,event):
global i
print "Starting handler:", i
r = event.getRegion() # get the observing region for this event
wait(0.5)
found = False
for j in range(i):
print("j: " + str(j))
try:
match = r.find(base_path + str(j))
found = True
break
except FindFailed:
print("ignore")
print(found)
if (found == False):
print("whY")
path = capture(r,"/Users/ongyichong/SikuliX/Scripts",str(i))
i += 1
print(str(i))
print "Ending Handler:", i
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.