sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #06814
Re: [Question #177997]: IDE: Not used images are purged when saving script --- solution
Question #177997 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/177997
RaiMan proposed the following answer:
I just went back to your stuff and checked:
all key images are matched with a score of > .99 in the shape you
currently have (as little background as possible).
If you capture the whole key (without the vertical black separator
lines) the scores go down to 0.9 and below and there are wrong matches.
So as long as you are using a search to identify a key, the current
approach (using as little background as possible) is the right one.
Since I guess, this is some preparation for later simulation of key presses based on a given string, I would not do it this way.
Instead of searching the keys and building a container(this should be a dictionary or a subclass of dictionary - why invent things new, that exist), that makes it possible to hit the keys, I would calculate the key positions based on the graphical geometry of the keyboard once and then just populate e.g. the qwerty container with the correct click points.
Another idea: Since you told me to open the keyboard image in an image
viewer (I used the chrome browser for that), I guess you are doing the
same with your tests. Are you sure, that the keyboard is displayed in
the original captured size? Only one pixel difference in size will make
it impossible for Sikuli to find the keys.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.