Question #293741 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293741

    Status: Open => Answered

Roman Podolyan proposed the following answer:
1) import random Python module
2) get location of top left corner
3) compute random offsets
4) add random offset to top left location coordinates to computer new random 
location withing given boundaries

________
# taken out of my old working code, modified to illustrate example with given 
data
import random
...
                # we know where top left corner is
                topleft = Location (744,1043)
                # 799 - 744 = 55  and we need random X offset
                x_offset = random.randint(0,55)
                # 1077 - 1043 = 34 and we need random Y offset
                y_offset = random.randint(0,34)
                click(topleft.right(x).below(y))

-- 
You received this question notification because your team Sikuli Drivers
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

Reply via email to