Sikuli clicks of target

Asked by Kevin

So i've tried to do a simple automation on my PC and it worked.
Now i wanted to automate something on my Laptop and strangely enough, even though i'm using the same code lines and new images, sikuli won't hit the target.

Sikuli clicks left and right of the picture seemingly randomly, even outside of defined regions.

Example:

while True:
    while regRightBar.exists(Pattern("1518093936461.png").similar(0.85)):
        click(regRightBar.getLastMatch()) #problem lies in clicking here.
        if regPopup.exists("1518095671758.png"):
            click(regPopup.getLastMatch())

I had to use a double while Loop, because Sikuli clicked outside of the picture.

I tested with the double while loop to see what the heck is going on and found out that after 3-4 iterations it finally clicked the image i wanted it to. I would solve it with Iterating and breaking it after it has finally found the right spot but on its way, it often clicks on things i dont want it to.

There are no offsets, and i did tests with various similiarities just to be sure.

Even though i defined a region to search and click on: click(regRightBar.getLastMatch())
... it keeps clicking outside of the region!

If there are any details i missed that you need please let me know.

Thank you in advance for your help and any suggestions are appreciated. ;)

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Windows 10?

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.