sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03896
Re: [Question #164207]: Re-use images captured before
Question #164207 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/164207
RaiMan proposed the following answer:
in script B:
scriptA = "path-to-the-scriptfolder.sikuli"
addImagePath(scriptA)
see: http://sikuli.org/docx/globals.html#importing-other-sikuli-scripts-
reuse-code-and-images
if you want to use images in more than on or two scripts here is another
possibility:
- make up a myImages.sikuli, that only contains captured images in the
form:
buttonOK = "captured image of button OK"
imageSomeName = "another captured image"
in the scripts that need the image, just say
from myImages import *
(look the docs mentioned above), and say:
find(imageSomeName)
click(buttonOK)
Be aware: Since the IDE does not reset imports on rerun, you have to
stop and restart the IDE, after making changes to myImages.sikuli.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.