How do I retrieve text properties?

The user can change background colors for the SUT application

I want to retrieve background and foreground text colors programically, then use that information for all text searches.

I plan on using the window title with offsets to locate specific text for sampling. Once I have that information I believe I can use this information to set global properties for foreground and background color information.


  • JonathanOSXJonathanOSX ForumAdmin admin
    You will probably want to use the ColorAtLocation() function in conjunction with ImageLocation() on a preference panel.
    put ColorAtLocation(imageLocation("ForegroundColorWell"))
  • Thanks I am starting to use the ColorAtLocation function.

    Follow up question: For text reading which color is used for the Ccontrast Color", the background color or the text color?
  • JonathanOSXJonathanOSX ForumAdmin admin
    You can actually use either. The point of the Contrast Color and Contrast Tolerance is that it will use those values to convert the image into just Black and White for the purpose of simplifying the character recognition.
Sign In or Register to comment.