Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with search area
#1
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.
Code:
Copy      Help
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?
#2
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
Code:
Copy      Help
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


Forum Jump:


Users browsing this thread: 1 Guest(s)