sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #00112
Re: [Question #138597]: How to define an image path for an image with target offset and similarity defined?
Question #138597 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/138597
Status: Solved => Open
Chris is still having a problem:
Hi RaiMan,
I'm having some problems with this in Sikuli X.
I have the situation where i have 2 modules
Mod1Path = "C:\\Modules\\Mod1.sikuli"
Mod2Path = "C:\\Modules\\Mod2.sikuli"
then my main script is in the location
C:\\Main\\Script1.sikuli
I want to execute Module 1 followed by Module 2.
so try
execfile(Mod1Path + "Mod1.py")
execfile(Mod2Path + "Mod2.py")
However the 1st image in Mod1 isn't found on the screen (when i run
Mod1 individually it is) so my script fails.
I also tried the following from above:
subPath = "path-to-sub-sikuli"
savedPath = getBundelPath()
# everywhere you use execfile()
setBundlePath(subPath) # images will be searched in sub.sikuli
execfile(subPath + "sub.py")
setBundlePath(savedPath) # images will again be searched in main.sikuli
however the error "NameError: name 'getBundelPath' is not defined
showed.
And:
subPath = "path-to-sub-sikuli" #Module 1 path
if not s in sys.path: sys.path.append(subPath)
import sub
However it showed: "NameError: name 's' is not defined.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.