sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #13168
[Question #208592]: Passing image to function problem
New question #208592 on Sikuli:
https://answers.launchpad.net/sikuli/+question/208592
Hi!
I'm new to SIkuli X and my question is:
How to pass an image in function for its future use there?
Small example:
######################################
def changeIconSizeTo(needSize):
if find("1.png") and needSize != "1.png":
click("1.png")
changeIconSizeTo(needSize)
elif find("2.png") and needSize != "2.png":
click("2.png")
changeIconSizeTo(needSize)
elif find ("3.png") and needSize != "3.png":
click("3.png")
changeIconSizeTo(needSize)
elif find("4.png") and needSize != "4.png":
click("4.png")
changeIconSizeTo(needSize)
else:
pass
click("1347627982956.png")
click("1347628464585.png")
click(Pattern("1347628684421.png").similar(0.86))
doubleClick("1347628756448.png")
changeIconSizeTo("3.png")
#####################################
It crashes on
changeIconSizeTo("3.png") - org.sikuli.script.FIndFailed: can not find 3.png on the screen
But I just want to pass this image as parameter for its processing in the function. I don't need to find this region on the screen.
Thanks in advance!
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.