Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait for color and then....

I am new user of QuickMacros.

How to make macro to make something like this:

IF "Color will show up and then disappear from the specyfic rectangle on the window" THEN

"Run recorded task"

And how to make trigger to repeat that....just simple REP?

 Thanks for any help.
Yes, use rep. To create "wait for color" code, use dialog "Find image".


Example. Waits for green color in a rectangle in Paint window.

Macro Macro328
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

,;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
,wait 0 -S "color:0x4CB122" w r2 16
,out "no green"
,,if(!IsWindow(w)) break ;;window closed
,,end _error

Forum Jump:

Users browsing this thread: 1 Guest(s)