SikuliX script run on none active window

Asked by Nick Kho on 2018-11-05

Hi, i made a script to auto task a program, but that program have to be current active window for it to run. Is there a way I can get the program to run on the window even though it's not the active window? Easier for me to multi task. Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Nick Kho
Solved:
2018-11-07
Last query:
2018-11-07
Last reply:
2018-11-06
Nick Kho (nick0920) said : #1

I found out about the function app.focus() will do some experimenting with it.

AFAIR I use App.open method for this.
=====
 classmethod open(application)

    Usage: App.open(application)

    Open the specified application, if it is not yet opened and bring it to front
=====

Here you may check the documentation: https://sikulix-2014.readthedocs.io/en/latest/appclass.html

Nick Kho (nick0920) said : #3

Yeh and I use the app.focus() function. The app I'll manually open it and let it run while I multitask and do something else. However, once it awhile while the script focus on the app it will interrupt my keyboard input on my current task. But it works . Thanks a lot.