title: How to use win32gui FindWindow with Wildcard
body: <p>I am trying to find if Microsoft excel has an open window</p>
  
  <pre><code>import win32ui
  import time
  
  def WindowExists(windowname):
      try:
          win32ui.FindWindow(None, windowname)
  
      except win32ui.error:
          return False
      else:
          return True
  
  if WindowExists("filename - Microsoft Excel"):
      print "Program is running"
      time.sleep(10)
  else:
      print "Program is not running"
      time.sleep(10)
  </code></pre>
  
  <p>this works if i enter the correct filename, but the thing is i dont know the filename.
  so how can i get this work when only knowing part of the title?</p>
  
  <p>or must i search on the classname instead? if so how do i know the classname :)?</p>
  
  <p>extra note:
  i do know the filename but it has a unknow number attached to it, something like filename88, and differs every time i run the program.</p>