title: Autohotkey: Scrape text from window (LOTRO)
body: <p>I am fairly advanced with my LOTRO scripting, but sadly, have not figured out a way to capture data from the chatbox.  I am trying to write an external mapping application and would like to have autohotkey automatically grab data from the screen, particularly the location data that has the heading, by typing:</p>
  
  <pre><code>/loc
  </code></pre>
  
  <p>inside of the chat box.</p>
  
  <p>This image is linked to imgur with the areas I am trying to capture highlighted.
  <a href="https://imgur.com/gvX46w4" rel="nofollow noreferrer"><img src="https://i.imgur.com/gvX46w4.jpg" title="source: imgur.com" /></a></p>
  
  <p>I find it very odd as I can highlight the text in the window easily, and copy and paste it to notepad or any other wordpad editor.</p>
  
  <p>I have tried to following methods to attempt to gather the text from the window, but I cannot seem to find any controls or text, even when running the script as administrator.  </p>
  
  <pre><code>WinGet, cList, ControlList, A
  Loop, Parse, cList, `n, `r
  {
    ControlGetText, cText, % A_LoopField, A
    if cText
      res.="Control: " A_LoopField "`tText: " cText "`n"
  }
  MsgBox % res
  
  WinGetText, text  ; The window found above will be used.
  MsgBox, The text is:`n%text%
  </code></pre>
  
  <p>Any ideas?</p>