sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #58407
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:
Sorry, it seems that I misunderstood the requirements.
If you want to keep the script running to answer skype calls multiple
times, whenever they come in, then you need the "While True".
In that case the only possibility that I see is fine-tuning the
frequency of checking for the skype pic by reducing the scan rate for
the skype image or increasing wait time between the checks.
HomeAssistant = App(r"c:\HA\Home_Assistant.exe")
Settings.WaitScanRate = 3 # -reduce this number to 0.5 for checking only once every two seconds, etc.
While True
wait(skype.png, FOREVER)
while exists(skype.png, 0):
wait(0.5) # increase this number to 2.0 for checking only every two seconds, etc.
HomeAssistant.focus()
Can the skype.png button appear anywhere on the screen, or is it always
in the same spot? In the latter case you should search only in that
region instead of the whole screen. This should also reduce resource
usage.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.