sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #16333
[Bug 966536] Re: Sikuli can't find a match on a second screen/monitor when calling a function in an included module
** Changed in: sikuli
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/966536
Title:
Sikuli can't find a match on a second screen/monitor when calling a
function in an included module
Status in Sikuli:
In Progress
Bug description:
Sikuli-X 1.0rc2
Windows 7 Ultimate 64 bit.
Sikuli can't find a match on a second screen/monitor when calling a
function in an included module.
I have a couple functions:
from sikuli.Sikuli import *
myScriptPath = "D:\\ICProjects\\sikuli\\testPOS.sikuli"
if not myScriptPath in sys.path:
sys.path.append(myScriptPath)
scr1 = Screen(0)
def initScreen(nScreen):
global scr1
scr1 = Screen(nScreen)
return scr1
def showSelectedScreen():
global scr1
scr1.highlight()
def ShowInfo():
global scr1
scr1.click(IMG)
They all work and find the IMG on the second monitor when they are
called in the local script.
However when I try to call them from a master script that includes
them it won't find the image. It will still show the same highlight on
the second screen though. (On my system screen 0 highlights the second
monitor, but I did try 1 as well)
from sikuli.Sikuli import *
#import os
myScriptPath = "D:\\ICProjects\\sikuli\\testML.sikuli"
if not myScriptPath in sys.path:
sys.path.append(myScriptPath)
import testPOS
reload(sys.modules["testPOS"])
scrML = testPOS.initScreen(0)
testPOS.showSelectedScreen()
testPOS.ShowInfo()
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/966536/+subscriptions
References