title: Detecting button enable in another application
body: <p>I have an application that I would like to write an automated test for.  The automated test will mimic an Operator's usage of the application.  I cannot change the source code of the application as it is "frozen" for review.  </p>
  
  <p>The application will display a pop-up (message) window informing the operator to click on a button after measurements are finished.  The button is enabled some time after the message window is closed.  </p>
  
  <p>I need to know how to detect when the application enables this button.  My research so far indicates that the application should broadcast a custom message to help the automated testing; but I cannot modify the source code.  </p>
  
  <p>Also, the application will enable radio buttons after the "Measurements Finished" button has been clicked, asking if the measurements were valid.  I need to detect this also.  </p>
  
  <p><strong>Summary:</strong>  </p>
  
  <ol>
  <li>How do I detect when a button
  (control) is enabled in another
  application?</li>
  <li>How do I get the handle of the other
  application?</li>
  </ol>
  
  <p><em>I am using C# with MS Visual Express 2010 on Windows NT, Vista &amp; 7.  If you suggest tools, I need them to be free as the company has a very tight budget.</em> </p>