sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #52717
Re: [Question #685286]: Sikuli Doc - Example code returns error
Question #685286 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/685286
xyz_User gave more information on the question:
Found anther topic and with a bit of modification this seems to work:
region = Region(12,152,1014,477)
print "scanning specified region"
r = region
r.onChange(1, changed)
r.observe(background=True)
Settings.isChanged = False
r.observe(3) #observes for 5 seconds
if Settings.isChanged:
print "there were changes detected"
else:
print "No changes detected"
def changed(event):
for ch in event.changes:
ch.highlight() # highlight all changes
---------------------------------------------
So in 3 seconds, it finds and highlights the changes, the problem is I
would like to simply click on the location of ONE of the random changes
If i set it to:
def changed(event):
for ch in event.changes:
ch.click() #Click on the changes
it'll click on every single area that changed, I would like sikuli to
only click the first change that it saw or just one of the random
change.
I hope that makes sense
Thanks
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.