Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keeping Macro Going during image find
#2
Try this.
 
Code:
Copy      Help
// script ""
var w = wnd.find(0, "window name", "applicationname").Activate();

IFImage[] image = {
    @"image:", //confirmation field y
    @"image:", //popup button
};
int primaryImageCount = 0;

while (primaryImageCount < 6) {
    var im = uiimage.wait(0, w, image);
    if (im.ListIndex == 0) {
        primaryImageCount++;
        keys.send("y"); // Primary image found, send "y".
    } else {
        // Secondary image found, you can close the popup or perform any other action.
        im.MouseClick();
    }

    
    //wait until the image disappears, else the scrit may find the same image instance again
    print.it("waitNot start"); //debug
    uiimage.waitNot(0, w, image[im.ListIndex]);
    print.it("waitNot end"); //debug
}


Messages In This Thread
Keeping Macro Going during image find - by Stu - 11-08-2023, 11:48 PM
RE: Keeping Macro Going during image find - by Gintaras - 11-09-2023, 04:57 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)