← Back to team overview

sikuli-driver team mailing list archive

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

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
folder = "C:\SikuliX\RESUMEN"

must be either
folder = "C:\\SikuliX\\RESUMEN" # escaped backslash

or
folder = r"C:\SikuliX\RESUMEN" # raw string

BTW: with version 1.1.1 in the IDE, you can name captured pictures at
capture time:

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

you can simply do that:
in a line having
forma =

leave the cursor after the = and click the capture button.
after the capture, the image will be named forma.png and could be used either as
reg2.click("forma.png") or even reg2.click("forma") 

or using the variable
reg2.click(forma)

this feature from the beginning encourages a naming convention

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