sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #50437
Re: [Question #678436]: Highlight fires two Times per Action
Question #678436 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/678436
Description changed to:
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)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.