Using PyWinAuto to control a currently running application

GoBlue_MathMan picture GoBlue_MathMan · Aug 18, 2016 · Viewed 15.1k times · Source

Using the following code I can find that the currently running window I want to connect is named "Trade Monitor" how do i successfull connect to it? Using the app.start_ method does not work.

from pywinauto import application
app=application.Application
app.findwindows #prints all windows running on machine

app.window("Trade Monitor") #error

Answer

Vasily Ryabov picture Vasily Ryabov · Aug 18, 2016

Just use app = Application().connect(title='Trade Monitor'). More detailed info is in the docs here.