← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #688961]: about onChange() function

 

Question #688961 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/688961

larryli posted a new comment:
thanks for your information.
I try to do as thef ollowing:

old_image = getScreen().capture(search_reg)
finder = Finder(old_image)

for x in range(0, 100):
        new_image = getScreen().capture(search_reg)
        start = time.time()
        changes = finder.findChanges(new_image)
        #print "elapsed:", time.time() - start
        for change in changes:
            print "**changed ",change, change.getW(),change.getH()
            changed = change.getW()*change.getH()
        wait(0.3)
        print("---We're on time %d" % (x))


as the log, it seems, always changed 18x13, but when there is big change in the region, it seems not detect.
search region is  R[811,385 19x14]@S(0)
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 0
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 1
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 2
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 3
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 4
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 5
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 6
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 7
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 8
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 9
**changed  R[0,0 18x13]@S(0) 18 13
---We're on time 10
**changed  R[0,2 8x7]@S(0) 8 7

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.