Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scan image with one image is faster than using a list of images
#1
I'm running a single macro to check if any of the images from an array appear on the screen. The performance is much slower compared to running multiple macros, each macro assigned to a single image. It feels like running an array of images has a wait time.

How can I get the performance of running a macro scanning a single image?

Running a macro per image, fast
Code:
Copy      Help
rep
     activateWindow
    int w=win("My program" "UnityWndClass")
        ; stop macro if closed
        err
            break

    scan "image:hE2706549" w 0 1|2|4|16|128 100
    err
        goto activateWindow
    ; image found, click
    act w
    lef   


Running one macro, checking from a list of images, slow:
Code:
Copy      Help
; run on one macro, slow
rep
     activateWindow
    int w=win("My program" "UnityWndClass")
        err
            break

    scan "image:hE2706549[]image:h15D4C1F6[]image:hCE13AE28[]image:h0E77C628" w 0 1|2|4|16|128 100
    err
        goto activateWindow
    ; any of the image from the array found, click
    act w
    lef   


Forum Jump:


Users browsing this thread: 1 Guest(s)