← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #194789]: Image Path

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- If an image is not found in the your-script.sikuli folder, when the script is loaded, only the file name is shown 
--- when capturing an image in the IDE, the image is always stored in the your-script.sikuli folder, no matter what image path settings you have in your script (addImagePath or setBundlePath, these are only evaluated at script run)
--- if you use setBundlePath() to get access to images stored somewhere else, you can no longer use the IDE Preview feature. Have a look at http://sikuli.org/docx/globals.html#importing-other-sikuli-scripts-reuse-code-and-images for possible solutions. 

So in your case, thumbnails will never be shown, supposing the images are actually stored at
D:\documents and Settings\sesa121526\My Documents\images

which means in the WindowsExplorer you should see the images
start.png
start-1.png

BTW: always avoid, to capture the same images twice. The easiest way is
to use image variables:

#exists("start.png") # this does nothing but searching the image, so it is cruft
imgStartButton = "start.png"
click(Pattern(imgStartButton).targetOffset(20,100))
wait(2)
m=getLastMatch()
x=m.right(120).above(100)
x.highlight(2)
wait(2)

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