[1.1.14 Jython] Settings.Highlight fires two Times per Action

Asked by Dirk Schiller on 2019-02-09

Script:
=====

import os, sys, time
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/sikulixapi.jar')

from org.sikuli.script import App
from org.sikuli.script import Screen
from org.sikuli.script import Pattern
from org.sikuli.script import Finder
from org.sikuli.basics import Settings
from org.sikuli.basics import Debug
from org.sikuli.script import Mouse
from org.sikuli.script import Location

class Sikuli:

    def __init__(self):
        Mouse.setMouseMovedAction(0)
        Settings.Highlight = True # Fires two Times per Action
        Settings.MinSimilarity = 0.95
        Settings.setShowActions(False) # Doesn't show any Effect
        self.screen = Screen()
        # Mouse.setMouseMovedHighlight(True)

    def app(self, app):
        try:
            self.app = App(app)
        except:
            pass
        finally:
            self.app = App(app)

    def app_open(self):
        self.app.open()

    def app_close(self):
        self.app.close()

    def move_offset(self, x, y):
        Mouse.move(x, y)

    def move(self, x, y):
        loc = Location(x, y)
        Mouse.move(loc)

    def click_image(self, image, timeout=5):
        self.move(0, 0)
        self.screen.wait(image, timeout)
        self.screen.click(image)

Versions:
=======
Jython 2.7.0
SikuliXApi.jar Version 1.1.4
Windows 10

Question:
========
If 'Settings.Highlight = True' is set every Action from Sikuli will fire two Highlights per Action means that the Screen()wait() function fires two Highlights for each 2 Seconds and also the Screen().click() fires two times Highlight for each 2 Seconds. Each should only fire one time.

Result Log:
[log] highlight M[1027,680 74x22]On(0) S 10000 for 2.0 secs << self.screen.wait(image, timeout)
[log] highlight M[1027,680 74x22]On(0) S 10000 for 2.0 secs << self.screen.wait(image, timeout)
[log] highlight M[1027,680 74x22]On(0) S 10000 for 2.0 secs << self.screen.click(image)
[log] highlight M[1027,680 74x22]On(0) S 10000 for 2.0 secs << self.screen.click(image)
[log] CLICK on L[1064,691]@S(0) (533 msec)

Question information

Language:
English Edit question
Status:
Expired
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-02-09
Last reply:
2019-02-24
Launchpad Janitor (janitor) said : #1

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