Will a find also make the window active? --- No!

Asked by John Catalyne

When I do a find for a picture, or a wait, until it appears, will it be automatically focused ( once it is found ) ?
Is there any way I could get a handle to it? I would like to make the respective window active before typing any text to it, to make sure no other window is in front of it.

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

The result of a find operation is only the respective region (a Match object) on the screen, where the image was found. It does not do any actions such as focus or can return any handle to the containing window.

To make sure, a window is frontmost, you have to use the features of class App (see: http://sikuli.org/docx/globals.html#controlling-applications-and-their-windows).

Can you help with this problem?

Provide an answer of your own, or ask John Catalyne for more information if necessary.

To post a message you must log in.