Windows: Toggle between windows

Asked by Aravind

The scenario is that, my current App window opens up a child window that cascades over the parent window. Now, I have to toggle back to the parent window to perform a click on an image in the parent window but it lies in the cascaded region under the child window. How could I perform this.

As I am new to Sikuli, my code to achieve this got limited to:

   Reg = App("ParentWindow")
   myReg = Reg.window(1)

This creates me a region over the parent window, but I have to manipulate the image components which lie under the child window..

Question information

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

on Windows: an opened (but not minimized) window can be brought to foreground using

App.focus("text")

where text is a distinguishing part (unique for all opened windows) of the respective window's title.

If this is not possible:
type(Key.TAB, KeyModifier.ALT)

brings the next window in the window switcher row to front. A subsequent type() brings back the window before.

... and there are many other possibilities, to do the job: with Sikuli just remember, what you would do manually and then check wether this is possible using simulation of mouse and keyboard.

Revision history for this message
Aravind (a4aravind) said :
#2

Thanks RaiMan, that solved my question.