← Back to team overview

sikuli-driver team mailing list archive

[Question #173203]: image found, but region location wrong

 

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

I have been trying to clean up some image matching issues.

I have a sikuli script that observes MS Visual Studio until a breakpoint is hit:

if exists("BreakpointArrow.png", 300):
    m = getLastMatch()
    m.highlight()


I expected the highlight to show up around the yellow arrow on the screen.  Instead, it shows up anywhere but the right location, and not always is the same place.

I need this match to be in the correct location, so I can do

n = m.right()
if n.exists("Line of code"):
    # breakpoint at correct location
else:
    # breakpoint at wrong location


I'm trying:

myArrow = Pattern("BreakpointArrow.png").exact()
if exists(myArrow):
  ...



Whether I use onAppear() or exists, the X and Y of the found image is never correct.  What is wrong?



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