← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #235095]: [1.0.1] global name 'getRegionFromPSRM' is not defined

 

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

    Status: Answered => Open

Carma Needham is still having a problem:
here are the steps of my program:

findAll(imageA),
matchesList = []
matches = SCREEN.getLastMatches()
while matches.hasNext():
    matchesList.append(matches.next())
for x in matchesList:
     newRegion = getRegionFromPSRM(x).above(70)
     if newRegion.inside().exists(imageB):
          dragDrop across some text that is to the left of imageB
          do some other stuff

There are several instances of imageB on the SCREEN, so I had been
getting the region of the match of imageA I was iterating on to make
sure that the right imageB was begin paired with the right imageA. I'm
sure there's a better way to do this, but I'm mostly self-taught, and
this was the best way I could come up with!

Also, I tried  newTarget = x.getTarget(), then
getRegionFromTarget(newTarget), but getRegionFromTarget() also throws
"[error] NameError ( global name 'getRegionFromTarget' is not defined )"

Any suggestions on how better to tackle this problem?

Thank you!

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