WindowTextExtractor is a portable app capable of retrieving the underlying text from a window.
WindowTextExtractor can be utilized with most Microsoft Office programs, console windows, and any window supporting Microsoft UI Automation (UIA). It is even able to recover passwords stored behind asterisks from most of the windows apps.
Once unpacked, running WindowTextExtractor is pretty simple. Click and drag the crosshair icon located top right of the interface to your target; the underlying text will be displayed. For instance, dragging the crosshair over to the Gmail login page will return 'Chrome Legacy Window,' or dragging it down to the taskbar's internet icon will return 'NetwrokInternet Access,' etc. There are only two options available; one for font selection, the other for directing the app to be always on top.
WindowTextExtractor will not function properly with non-windows-based applications like GTK, Flash, QT, or applications not using the standard edit box for the password. It does not work with HTML pages in browsers such as Firefox, Chrome, etc.