← Back to team overview

sikuli-driver team mailing list archive

[Question #210826]: import fails

 

New question #210826 on Sikuli:
https://answers.launchpad.net/sikuli/+question/210826

I'm using rc3 on Windows 7. I followed the documentation at
http://sikuli.org/docx/globals.html#importing-other-sikuli-scripts-reuse-code-and-images
and had some success with it, but it stopped working and I'm trying to figure out why.

I have a simple 3 step sikuli script that opens a menu. I want to reuse this script, if possible. The location is d:\sikuli\openmenu.sikuli

from sikuli import *

click("1349796451457.png")
hover("ycrlage.png")
hover("Neu.png")


The main script is located in d:\sikuli\abnahme00-reset.sikuli:

from sikuli import *
myScriptPath = "d:\\sikuli\\"
if not myScriptPath in sys.path: sys.path.append(myScriptPath)

import openmenu

click("SprachEditor.png")
...

For some reason the code in openmenu is never executed when abnahme00-reset is run. It worked before, though. It stopped working after I tried to place the three steps in openmenu into a function 'doOpenMenu' and call that, as I need to use this code more often. Since this attempt, it fails completely.



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