.focus() won't work with fullscreen app

Asked by Brenna Clark

I'm using a full screen GUI along with a simulator application. I open the simulator successfully, then I manipulate the GUI. Later in the script when I need to access the simulator, it's hidden behind the GUI so .focus() does not work.

With simApp = App("BodyTom Simulator") declared at the top I've attempted:
1. simApp.focus()
2. if not simApp.window():
        openApp(simApp)
        simApp.focus()
    else:
       simApp.focus()

P.S. I am running on Windows.

Any help would be greatly appreciated!

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

sorry, known problem.

No other solution currently, then to avoid it.

Revision history for this message
Brenna Clark (bclar291) said :
#2

I ended up using type(Key.TAB, KeyModifier.ALT) to change windows to the one I wanted

Revision history for this message
Test (c4456517) said :
#3

Just wondering, what about switchApp(simApp)?

Revision history for this message
RaiMan (raimund-hocke) said :
#4

switchApp() simply is a shortcut at the Python API level, that internally finally ends up in an App.focus() as well.

Can you help with this problem?

Provide an answer of your own, or ask Brenna Clark for more information if necessary.

To post a message you must log in.