sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #12820
[Question #207264]: Setting Default Region?
New question #207264 on Sikuli:
https://answers.launchpad.net/sikuli/+question/207264
Hey
I was wondering if it was possible to set the default region manually away from SCREEN. I'm looking to do this as I'm setting up a mini framework where I have a bunch of reusable code in there own library file, which is imported as needed.
Breaking it down further, the specific problem I'm currently having (which this would solve) is I have methods in this library that themselves use Region methods, i.e. exist(). This causing a problem when I'm using a specific region (with 'with region:') as the library method does not recognize this and default back to the screen region.
So for example:
main file:
myReg = Region(App("Chrome").window())
with myReg:
from import lib *
eitherOr([img1, img2])
lib file:
from import sikuli *
def eitherOr(imageList):
for x in range(0, len(imageList)):
print x
if(exists(imageList[x], 0)):
return imageList[x]
The exists in the lib file does not pick up myReg as region.
Any help would be brilliant. Thanks!
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.