sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #32638
Re: [Question #266528]: app.focus() not working after window title change (Windows 8.1)?
Question #266528 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/266528
RaiMan proposed the following answer:
coming back to the initial question, then I think, this should work now
with your app
- start it outside Sikuli using Python's subprocess module right now
(you mentioned before)
- then in the script:
app = App.focus("part of initial window title")
print app
# actions, that change the window title
app.focus() # should bring the app to front
print app
so that App.focusedWindow() should work.
the print app are only to check, how we see the app currently in the
process list.
The alternative to the outside start should be using
app = App.open(r'"path-to-your.exe" parameters for your app')
--- the never ending window list
... is completely unusual
On Windows many applications have sometimes 10 or more windows defined, that are not visible (either outside the screen or set invisible). This is currently not detected by the implementation of the Win32 API calls. So you have to do some filtering, to get the most probable window.
... but never before I have seen this situation, that the same window
area is mentioned more than 1 or 2 times.
... and since you are saying, that the visible window fills the screen
(with 1920x1200), then it is strange, that this window is not in your
list of the first 10 windows.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.