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

    Status: Open => Answered

RaiMan proposed the following answer:
To make things like that robust, you first should evaluate the
geometrics of your list and then check using highlight() and/or hover()
to make sure the final locations are correct. Do this in a separate
script tab in the IDE and finally use the values you found.

In your case you would have seen, that ref.offset(Location(150, 390) has
the same dimension as ref, since you are working with regions in this
case and hence evaluates to an unwanted click point (centre of
ref.offset(Location(150, 390))

Since I suppose you want to hit the centers and have evaluated the
offset values accordingly:

ref = find(image.png).getCenter()

might do it, supposing the offset values are correct

Furthermore i recommend to use the relative dimensions of your list and address 
a list entry with its number.
listFirst = ref.offset(Location(x, y))
listH = 60 # to be evaluated

... and to hover over the 4th item:
item = 4
hover(listFirst.below((item -1) * listH)

this could even be moved into a def like
def dragItem(n):
   # implement the drag here

-- 
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     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to