Try using WinGetText and/or WinGetTitle
See the AHK help file in the start menu >> autohotkey >> autohotkey
help file for usage information:
Example
Run, Calc.exe
WinWait, Calculator
WinGetText, text ; The window found above will be used.
MsgBox, The text is:`n%text%