Posts: 34
Threads: 14
Joined: Feb 2017
Hello!
I do macro with search a lot pictures. And it so slow. that is why I limit search area. help me please, it does not work.
RECT r; r.left=383; r.top=228; r.right=548; r.bottom=295
int Ah = wait(0.01 S "image:hEBA8B1B3" 0 r 0 16 8);err
if Ah=1
out "у"
Can you to tell me other way to search pictures faster?
Posts: 12,071
Threads: 140
Joined: Dec 2002
Your code waits for 8-th matching image in rectangle r which is in screen coordinates, using color difference 16.
To find faster, search in window (not in screen) and use flag 0x1000. This flag is unavailable in old QM versions.
Macro
Macro1054
int w=win("Window Name")
RECT r; r.left=383; r.top=228; r.right=548; r.bottom=295 ;;rectangle in w client area coordinates (flag 16)
int Ah = wait(0.01 S "image:hEBA8B1B3" w r 0x1000|16 16 8);err