SikuliX script run on none active window

Asked by Nick Kho

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Nick Kho
Solved:
Last query:
Last reply:
Revision history for this message
Nick Kho (nick0920) said :
#1

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

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#2

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

Revision history for this message
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.