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

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.
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)