Question #231485 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/231485
Status: Open => Answered
RaiMan proposed the following answer:
App.focus() does not raise exceptions.
If it fails, it returns null/None, outherwise the App object.
This should work:
from subprocess import Popen
#try to focus on an app
if not App.focus('Login'):
# use Popen if the app is not found
Popen([r'path to some app',], )
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp