Question #201531 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/201531
Roman Podolyan proposed the following answer:
#-------------------
import java.util.Random
import random
def x():
random.randint(0,10)
b = wait("1340345219668.png")
click(b.getCenter().offset(x,x))
#-------------------
I don't see any assignment of "x" variable. So the Jython gives you
right error: "x" should be initialized by integer number.
You may try it this way (two variables, X and Y):
#------------
x = random.randint(0,10)
y = random.randint(0,10)
b = wait("1340345219668.png")
click(b.getCenter().offset(x,y))
#-----------
This code works for me in Sikuli.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp