← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #332104]: App finds and focus on the wrong window

 

Question #332104 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/332104

RaiMan proposed the following answer:
Not really what I suggested:

mywindow = App("Output")
if not mywindow .isRunning():
exit(1)
mywindow .focus("Output")
appWindow = mywindow .focusedWindow()

... but more like that

myApp = App("the app having the window titled Output")
if not myApp .isRunning(): exit(1) # checks wether the app is running
myApp .focus() # brings your app to front
myWindow = App .focusedWindow() # now you have the frontmost window of your app (hopefully that one name Output ;-)

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.