If Window (or screenshot variable) contains Pixel

Hey guys,

I am trying to see if I can trigger an action (Pause Until, If then Else, Until, etc.) with a Pixel condition. For example if a specific window contains a red pixel (or brighter) then prompt for x action, if not then do y action.

I could only get the pixel condition to work at a specific pixel location, but was wondering if it could be used for a pixel area ( a la screen shot and other functions) to determine if the colored pixel is there. If so could this be done in a specific window, or via a screen shot?

Would be super helpful to know how to set this up, for I have attempted it a few times, and can't seem to figure it out.