title: pywinauto change application name
body: <p>My project revolves around automating a few task. I open an application, a new 3D file then I do some operation from an access base. I chose <code>pywinauto</code> and graphic interaction because of the operator needs to do intervention on the software.</p>
  
  <p>My issue is that: the name of the application change when I open a new file. There is the code :</p>
  
  <pre class="lang-python prettyprint-override"><code># Search data on the Access Base
  cursor = conn.cursor()
  cursor.execute("SELECT * FROM [SophieBot_produit] WHERE [SophieBot_produit].[ID PRODUCTION] =?",(prod))
  produit_sql = cursor.fetchall()
  production, statut, produit_value, nb_element, cas, gamme, sl_tps_open, sl_tps_gen, sl_tps_save = produit_sql[0]
  produit = str(produit_value).zfill(8)
  
    # Data work, check with print()
  
  #Connecting to the software
  app = application.Application()
  app.Connect(path='C:\\myprogram')
  
    # First step everything works
  app.SLMAutoFab.menu_select("File -&gt; Open")
  app.window_(title_re="Open file.*").Edit.SetEditText('S:\\32 - Articles\\'+ str(gamme) +'\\' + str(cas) +'\\' + str(produit) +'_sup.stl')
  app.window_(title_re="Open file.*").Ouvrir.Click()
  
    # New step is to do operation on the  software
  </code></pre>
  
  <p>Now my software application name is changing <code>Myprogram - 3DFile</code></p>
  
  <p>When you write the new name everything works for example :</p>
  
  <pre class="lang-python prettyprint-override"><code>app.SLMAutoFab00057389_sup.Part.Click()
  </code></pre>
  
  <p>But the name of the software change, so I try :</p>
  
  <pre class="lang-python prettyprint-override"><code>win = 'MyProgram' + str(produit)
  app.win.Part.Click()
  </code></pre>
  
  <p>The code doesn't work and the error message is:</p>
  
  <blockquote>
    <p>MatchError: Could not find 'win' in 'dict_keys</p>
  </blockquote>
  
  <p>I'm trying to connect with <code>window(handle)</code>, and will update the post if it works. Any hints or pointers are greatly appreciated.</p>