title: How to interact with a window's GUI with Python?
body: <p>Let's say you want to open <code>myapp.exe</code>, open the 3rd menu, then choose the 2nd menu item (i.e. like a user would do with the keyboard or mouse), and then in the dialog window, choose the 2nd button.</p>
  
  <p><a href="https://pyahk.readthedocs.io/en/latest/" rel="noreferrer"><code>pyahk</code></a> and <a href="https://pyautogui.readthedocs.io/en/latest/cheatsheet.html" rel="noreferrer"><code>pyautogui</code></a> seem to offer this, but in a rather "low-level" way, by simulating clicks:</p>
  
  <pre><code>pyautogui.click(x=moveToX, y=moveToY, clicks=num_of_clicks, interval=secs_between_clicks, button='left')
  </code></pre>
  
  <p><strong>How to do interact with a Windows GUI in a higher-level way with Python?</strong></p>
  
  <p>Example:</p>
  
  <pre><code>window = gui.open('myapp.exe')
  window.menu_open(3).choose_item(2)
  child_window = window.wait_for_dialog()
  child_window.buttons[1].click()
  </code></pre>