title: Using PyAutoGUI with VirtualBox/virtual machines
body: <p>I'm trying to get pyautogui's locateOnScreen to work on a virtual machine, so I can run multiple tests at once. I was hoping there's some setting in virtual box that I'm missing that might resolve this. Here's the code:</p>
  
  <pre><code>import pyautogui
  import win32com.client
  autoit = win32com.client.Dispatch("AutoItX3.Control")
  
  autoit.run(application_path)
  
  open_application = autoit.winWait("title_of_app", "", 10)
  header_logo = pyautogui.locateOnScreen("header_logo.png", 10)
  
  if open_application == 1 and header_logo is not None:
      print "Detected application window."
  else:
      if open_application == 0:
          print "Failed to detect application window."
          assert open_application 
      else:
          print "Failed to detect logo in header of application window."
          assert header_logo
  </code></pre>
  
  <p>Outside of the VM this passes, and inside I always run into "Failed to detect logo in header of application window". I've tried tweaking the image a lot and nothing will take. The main desktop is Windows 7 64-bit and the VM is Window 7 32-bit. Is there a way to get this to work on VirtualBox or any VM software?</p>
  
  <p>Edit:
  I should add that AutoIt's winWait returns a 1 or 0 and PyAutoGUI's locateOnScreen returns None or the coordinates of where the image was located on screen and the size of the image used.</p>