# Get access to any window on the desktop

from pywinauto import Application #for autowin
import pywinauto.keyboard
import time

lsAppPath = ""

#start the app
app = Application().start(lsAppPath)

#while the window does not exist
while not app.app():
      time.sleep(5)
      
      
#the title from the window we would like to access
lsWindowTitle = ""

#check if the window exists
if app.window_(title_re= lsWindowTitle).Exists():   
  #get the window
  Window = app[lsWindowTitle]
  
  #we imagin there is an edit with the text hallo
  #get the edit
  editCtrl = Window[u'MyEdit'] # we need the name of the edit
  lsText = editCtrl.TextBlock() # thats the important line 
  
  #now we would like to write into the text edit
  editCtrl.TypeKeys(u"Nothing")

727c697bfd2c1fbf41b6a57f41f24202d4c0f4b7
<mask token>

<mask token>
while not app.app():
    time.sleep(5)
<mask token>
if app.window_(title_re=lsWindowTitle).Exists():
    Window = app[lsWindowTitle]
    editCtrl = Window[u'MyEdit']
    lsText = editCtrl.TextBlock()
    editCtrl.TypeKeys(u'Nothing')

<mask token>
lsAppPath = ''
app = Application().start(lsAppPath)
while not app.app():
    time.sleep(5)
lsWindowTitle = ''
if app.window_(title_re=lsWindowTitle).Exists():
    Window = app[lsWindowTitle]
    editCtrl = Window[u'MyEdit']
    lsText = editCtrl.TextBlock()
    editCtrl.TypeKeys(u'Nothing')

from pywinauto import Application
import pywinauto.keyboard
import time
lsAppPath = ''
app = Application().start(lsAppPath)
while not app.app():
    time.sleep(5)
lsWindowTitle = ''
if app.window_(title_re=lsWindowTitle).Exists():
    Window = app[lsWindowTitle]
    editCtrl = Window[u'MyEdit']
    lsText = editCtrl.TextBlock()
    editCtrl.TypeKeys(u'Nothing')

# Get access to any window on the desktop

from pywinauto import Application #for autowin
import pywinauto.keyboard
import time

lsAppPath = ""

#start the app
app = Application().start(lsAppPath)

#while the window does not exist
while not app.app():
      time.sleep(5)
      
      
#the title from the window we would like to access
lsWindowTitle = ""

#check if the window exists
if app.window_(title_re= lsWindowTitle).Exists():   
  #get the window
  Window = app[lsWindowTitle]
  
  #we imagin there is an edit with the text hallo
  #get the edit
  editCtrl = Window[u'MyEdit'] # we need the name of the edit
  lsText = editCtrl.TextBlock() # thats the important line 
  
  #now we would like to write into the text edit
  editCtrl.TypeKeys(u"Nothing")
