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

RaiMan proposed the following answer:
Image names not given as absolute path will always be searched on the current 
image path, where the current bundle path (main script) will always be the 
first entry.
addImagePath() always adds to the end.
To find an imagefile, the imagePath is scanned from first to last entry and 
stops with the first success.

LOL, writing this, I have to admit, that you are half right:
- an imagefile will always be found, since each import of a .sikuli adds to the 
image path as well (where ever it was issued)
- but nameclashes are still possible, since the file search is not restricted 
and always on the complete current image path (and we do not have an unimport 
yet)

So to implement your approach, the directory structure has to be
converted into a structure filename:

instead of 
Project/Module/Window/Name1.png

you would have
Project/Module/Images.sikuli

and in Images.Sikuli
img1 = "Window_someImage.png"

supposing the level Window is the differentiating level.

Another possibility would be:
Project/Module.sikuli

and inside you have subdirectories
Project/Module.sikuli/Window/Name1.png

and then
img1 = "Window/someImage.png"

nevertheless: interesting discussion - adds to what I will implement in
version 2 with ImageGroup. Thanks.

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to