Yes, use rep. To create "wait for color" code, use dialog "Find image".
Similar: http://www.quickmacros.com/forum/showthr...0#pid32460
Example. Waits for green color in a rectangle in Paint window.
Macro Macro328
Similar: http://www.quickmacros.com/forum/showthr...0#pid32460
Example. Waits for green color in a rectangle in Paint window.
Macro Macro328
int w=win("Untitled - Paint" "MSPaintApp")
RECT r; SetRect &r 0 100 100 200 ;;rectangle x y right and bottom in w client area
rep
,err-
,
,;wait for a green pixel in rectangle r
,RECT r2=r
,wait 0 S "color:0x4CB122" w r2 16
,out "green"
,
,;wait until green disappears
,r2=r
,wait 0 -S "color:0x4CB122" w r2 16
,out "no green"
,
,err+
,,if(!IsWindow(w)) break ;;window closed
,,end _error