← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245571]: Action upon NO change

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Handler in handler: no.

A loop to detect that a region changes:
reg = ... some region
while True:
  img = Pattern(capture(reg)).exact() #1
  if reg.exists(img, 0): #2
    # no change
  else:
    # has changed
  wait(1)

Use break to jump out of the loop

#1 and #2 are the way to check for changes in the region reg

Sorry for answering briefly: I am on vacation :-)

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.