There is a windows API command you can use called GetPixelColor (or something close) that will return the exact color of a pixel on the screen. You will need to find the location on the screen of the color you want and then the script can compare a stored value to the actual screen color.
I have used the command before but off the top of my head I can remember the syntax. If you call the Compuware help desk they can help you out with this.
I will continue to look for my doc in the next few days and see if I can find it.
//--------------- get_pixel_color -------------
//Get the color of a pixel from a Window/Object.
//arg1 - Handle of the Window or Object.
//arg2 - x pixel offset from the upper left of the Window/Object.
//arg3 - y pixel offset from the upper left of the Window/Object.
Function getPixelColor(hWnd, xobj, yobj) : var
x = get_pixel_color(hWnd, xobj, yobj)
End Function</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Hope this helps.