sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #58410
Re: [Question #702646]: Optimizing resource usage
Question #702646 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/702646
Status: Open => Answered
Manfred Hampl proposed the following answer:
Also "exists" should be restricted to the smallest possible region.
Something like
HomeAssistant = App(r"c:\HA\Home_Assistant.exe")
Settings.WaitScanRate = 0.5
myRegion = Region(1381,22,519,964)
while True:
myRegion.wait("1659658059381.png", FOREVER)
while myRegion.exists("1659658059381.png", 0):
wait(3)
HomeAssistant.focus()
Further enhancement of the script could be to identify the exact
position where the skype image is found in the "wait" statement, and
then use that region for re-checking if it still existing the "exists"
statement.
Perhaps something like
HomeAssistant = App(r"c:\HA\Home_Assistant.exe")
Settings.WaitScanRate = 0.5
baseRegion = Region(1381,22,519,964)
while True:
foundRegion = baseRegion.wait("1659658059381.png", FOREVER)
while foundRegion.exists("1659658059381.png", 0):
wait(3)
HomeAssistant.focus()
(For the openjdk processes I do not know enough about the technical
details, hopeful RaiMan can answer that.)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.