← Back to team overview

sikuli-driver team mailing list archive

[Question #153685]: Pattern.similar resets targetOffset to (0, 0) --- workaround

 

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

Summary changed to:
Pattern.similar resets targetOffset to (0,0) --- workaround

Description changed to:
********* workaround

only Pattern p = some-other-pattern.similar().targetOffset() works

so only if Pattern.targetOffset() is the last action in a given Pattern,
targetOffset is remembered.

----------------------------------------------------------------------------------------------------------------------------------
Sikuli Version: Sikuli X 1.0rc2 "Maltese"
Operating System: Windows 7 32 bit

Steps to reproduce:

           Screen sikuli = new Screen();
           Pattern testPattern = new Pattern("DFWizard.DFName.PNG");
           testPattern.similar(0.95f);
           testPattern.targetOffset(30,0);
           sikuli.doubleClick(testPattern,0);
           sikuli.type(testPattern,dfName,0);

When I do this, sikuli is not using the specified offset of 30 pixels.
It should be offset of 30 pixels.  Please fix this in the java api.

You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.