title: Click on a control using AutoIt if a window is present in the background or in the front
body: <p>I want to click a button that is present on a form of an EXE file.</p>
  
  <p>Below is my code that I have tried.</p>
  
  <pre><code>WinWaitActive("ABCD")
  ControlClick("ABCD","Defer","[CLASS:Button; INSTANCE:2]")
  Run("ClickDefer.exe")
  </code></pre>
  
  <ul>
  <li>The first line, <code>WinWaitActive("ABCD")</code> waits till a window named <strong>ABCD</strong> comes into focus.</li>
  <li>The second line clicks on a button, <strong>Defer</strong> </li>
  <li>The third line runs the same EXE file for handling same scenario if it occurs.</li>
  </ul>
  
  <p>This works properly if the <strong>ABCD</strong> window comes into focus. It doesn't work if it is not in focus. How do I overcome this problem?</p>