Reputation: 2394
I'm using AHK's windowSpy, and upon clicking on the R window, none of the text is revealed. Is there a way to read in text from R? I'm just using vanilla R, no editor. I just downloaded AHK so I should have the most recent version
Upvotes: 0
Views: 380
Reputation: 8372
No. If the windows spy doesn't show text, then you can't read text directly.
There are a few tricks you can do, to read text indirecty, though.
It all depends on why you want to read the text.
If R allows copying to the clipboard, you can simulate the mouse/keyboard movements to capture to copy the text to the clipboard.
If you are looking for specific text, you can use ImageSearch
to search inside the window.
If you are programming and want to pass results to AHK, you might be able to set the caption text of the form that runs R (which is visible to AHK)
Also, if you run R in a normal dos window there is the possibility to connect AHK to that window so that it can see this windows content. This is pretty advanced, see here for an example.
Upvotes: 2