← Back to team overview

sikuli-driver team mailing list archive

[Question #630264]: Sikuli won't find previously captured image

 

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

Hi, totally new to Sikuli and programming, great program!

I am having trouble making sikuli recognize an image in one region of the screen and then find it in another region of the screen. Everything works great with the regions but it just doesn't like captured images.

if exists("1493406248051.png"):
    waitVanish("1493406248051.png",180)

if exists("1493405892790.png"):
    waitVanish("1493405892790.png",180)
    wait(Pattern("1493406514054.png").similar(0.80),200)

import shutil
import os

folder = "C:\SikuliX\RESUMEN"
img = capture(Region(183,75,35,36))
shutil.move(img, os.path.join(folder, "FORMA.png"))

wait(2)
reg2 = Region(Region(257,37,331,118))
reg2.click("C:\SikuliX\RESUMEN\FORMA.png")

exit()

I am absolutely sure the regions are right, and I checked the image captured by opening it on my hard drive and it's great. But it won't find FORMA.png

So to rule out a region problem I widened the search:
click("C:\SikuliX\RESUMEN\FORMA.png")

Which I suppose searches for it on the whole screen, but still  doesn't even find the image on the same region it was captured.

Help please, thanks




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