If you can determine the correct font characteristics, then you might be able to get a match by pulling a color from the background, but you’d need to know the area of the screen in which to look, so if this would work at all, it would only work if the text is consistently displayed in the same area of the screen. (The area can be defined dynamically based on other UI elements, but it would always need to be in the same relationship to those elements, such as below a specific dropdown menu and above an OK button.) So let’s say that you can define the search area like this:
put imageLocation("somePopup") into upperLeft
put imageLocation("someButton") into lowerRight
set the searchRectangle to (upperLeft, lowerRight)
Then you could try getting the background color by sampling just inside the searchRectangle:
put colorAtLocation(upperLeft + (1,1)) into bgText
You might need to check to make sure that the bgText color isn’t white (or whatever color the text itself is supposed to be) and make a loop where you keep moving over a pixel at a time until the color found is not the color of the text (although the effects of antialiasing could really complicate that effort).
I hope this gives you an idea of how to approach scripting this scenario. I still wouldn’t anticipate a lot of success, but this might be worth a try.