title: How to use ControlGetText Command in Autohotkey?
body: <p>I used MS Excel sheet for tests but it failed to work. My script is this:</p>
  
  <pre><code>F1::
  ControlGetText, OutputVar, Edit1, ahk_class XLMAIN
  Return
  F2::
  Send %OutputVar%
  Return
  </code></pre>
  
  <p>So when I press hotkey F1, the script should retrieve the text of edit box and when I press hotkey F2 it should send that text, but it is doing nothing on pressing these keys. </p>
  
  <p>As you can see in this snapshot:</p>
  
  <p><img src="https://i.stack.imgur.com/BETiW.png" alt="screenshot"></p>
  
  <p>(All the control IDs are only for the purpose of testing)</p>