← Back to team overview

sikuli-driver team mailing list archive

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:
Are you sure that you need the "While True"?

I do not know the details of your system, but I would expect that the
following may be sufficient, unless the skype window (identified by
skype.png) re-appears again and again.

HomeAssistant = App(r"c:\HA\Home_Assistant.exe")
Settings.WaitScanRate = 3
wait(skype.png, FOREVER)
while exists(skype.png, 0):
  wait(0.5)
HomeAssistant.focus()

The WaitScanRate and wait(0.5) values could also be modified, if it is
not time-critical.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.