New question #143611 on Sikuli:
https://answers.launchpad.net/sikuli/+question/143611
This took me a while to debug, but whenever I try to set a rectangle on my
screen object in Java code, it will skew where it finds the match/where it
clicks.
For example: Here's some sikuli script code with equivalent Java code.
Screen(1).setROI(Region(-1300,81,924,784))
Screen(1).click(Pattern("lowerLeftHUD.png").targetOffset(70,0))
currentScreen.setROI(-1300,81,924,784); //Same thing happens with setRect,
though I doubt this matters
currentScreen.click("/lowerLeftHUD.png", 0); //The offset in the java code has
already been set.
Here's what they both find.
IDE:
[info] click on (-893,686), MOD: 0
[debug] showTarget -933 646 80 80
Java
[info] click on (-753,766), MOD: 0
[debug] showTarget -793 726 80 80
It seems if I mess with the Region in Java slightly, I was able to get it to
click a little bit elsewhere. Which seems to me that the Region is affecting
the match/click point which is kinda scary. The current work-around is to just
not restrict the search area in Java. The bug seems to not occur when I just
search the whole screen but this sorta takes away a very helpful feature for
Java 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