sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #22228
[Question #238920]: Is there any way to create a copy of a Screen object?
New question #238920 on Sikuli:
https://answers.launchpad.net/sikuli/+question/238920
I want to do something like this:
t=copy.deepcopy(s)
Since my code looks like this:
def gScr():
#Post: get the screen to run on
numScr = getNumberScreens()
if(numScr > 1):
sValid=0
while(sValid!=1):
if(sValid==-1):
popup("Invalid screen number.")
stemp=input("Please enter the screen number to run this script on (0 = primary screen, 1 = next screen, etc.): ")
sValid = -1
if(RepresentsInt(stemp)):
try:
sI= int(stemp)
if(sI>= numScr or sI<0):
popup("No screen " + sI + " detected.")
else:
return Screen(sI)
sValid = 1
except Exception, e:
print e.__doc__
print e.message
else:
return Screen(0)
s= essential.gScr()
#Region area specified
xReg = find(starImg).getX() - 400
yReg = find(starImg).getY() - 60
widthReg = 1200
heightReg = 600
t=copy.deepcopy(s)
t.setRect(xReg, yReg, widthReg, heightReg)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.