Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait for color and then....
#2
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
Code:
Copy      Help
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


Messages In This Thread
Wait for color and then.... - by Kojot - 02-16-2019, 09:06 AM
RE: Wait for color and then.... - by Gintaras - 02-17-2019, 08:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)