Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
React on color function + macro
#1
Hello,
i would like to get a little help from someone please.

I would like to achieve function check every 100ms or less for example the exact location (or rectangle if possible) and once the color appear run macro which click on exact loc.

But unfortunately function doesn't work so well.

Macro works if i run it manually.

Function
Code:
Copy      Help
int x y color
lpstr macro

;define coordinates, color and macro
x=18
y=159
color=ColorFromRGB(255 144 0)

;wait for color
;g1
rep
,if(pixel(x y)=color)
,,mac "macro2"
,,break

macro2
Code:
Copy      Help
int w1=act(win("Lineage II" "l2UnrealWWindowsViewportWindow"))
lef 518 559 w1

Thanks in advance for help.


Attached Files Image(s)
   
#2
The code is correct, but at the end should be

,wait 0.1

Also, QM has "wait fore color" action. Look in Wait dialog.

Or can wait for image in a rectangle. 1-pixel image can be created at run time... I can create such function if you need.
#3
Sweet the wait for color dialog works great.

Thanks for help.

I'll consider buy license soon.


Forum Jump:


Users browsing this thread: 1 Guest(s)