← Back to team overview

sikuli-driver team mailing list archive

[Question #179084]: looking for several pictures and return value

 

New question #179084 on Sikuli:
https://answers.launchpad.net/sikuli/+question/179084

Hi,

For some time I am trying to implement a function to check for pictures in a region and return a value. At first I used this:

def chkpic():
    if exists("img1".exact()):
       return 1
    elif exists("img2".exact()):
       return 2
    elif exists("img3".exact()):
       return 3

Did not work. Then I tried this and it did not work either:

def chkpic():
   if find ("img1".exact()):
      return 1
   elif find("img2".exact()):
     return 2
   elif find("img2".exact()):
     return 3

The function is triggered by another function were some seconds are waited for the images to appear and then this functions is called but it doesn't work.

best KZ

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