New question #216666 on Sikuli:
https://answers.launchpad.net/sikuli/+question/216666
Hi,
I am trying to learn sikuli and wanted to test it out by writing code to
solve a sudoku puzzle (app is available at
http://portableapps.com/apps/games/sudoku_portable). I am able to use findAll()
to find all the blank images (cells) but when I try to hover over the matched
region, the initial cells are found centered, but subsequent ones the cursor
moves to the edge/offcenter of the matching region. The matches are getting
skewed.
The code is very simple and as follows:
---------------
from org.sikuli.script.natives import Vision
Vision.setParameter("MinTargetSize", 100)
Settings.MinSimilarity = 0.9
Settings.SlowMotionDelay = 1
setShowActions(True)
r = find("HSudokuEasyQ.png").below(482)
if r is None:
popup("Sudoku application is not running")
exit(1)
print(r)
for x in r.findAll("1355325034927.png"):
hover(x)
-------------------------------
NOTES:
1. HSudokuEasyQ.png matches the header and menu of the application.
2. 1355325034927.png matches a blank tile (without the borders). I skipped the
borders because the cells can be in any of the nine locations and they have
different shading effects based on the location.
3. I tried changing the MinSimilarity values and it does not help.
If there are 15 blank regions found, hovering on the intial 5-6 regions is
perfectly centered, the later regions show increasing skewedness and towards
the end, the hovering is totally wrong.
What can I do to ensure that the regions are perfectly matched and the hover
centers on the region perfectly each time? I could not locate any pointers to a
solution in the docs - most probably I was using the wrong search terminology.
Appreciate it if you can point me to the relevant docs or give some
suggestions/ideas on how to resolve this.
Regards,
Mahesh
--
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