I've pored over the forum and the wiki and the closest that I've found to my problem is How To Search For Multiple “Found Image” Actions, but that's simplistic compared to what I'm trying to do.
What I would like to be able to do is combine the "If image is on the screen" with finding the Topmost image and save that location to a variable, all at once. But that does not seem possible.
I have two possible logo images that I'm looking for, and either will appear multiple times on the page. Older pages have only the older logo and newer pages have the newer logo. Mixed pages are rare enough to deal with manually, without KBM help.
I want to be able to click on the topmost logo that appears, regardless of which type it is.
So far, my logic appears to have to be:
First, I have have an If-Then-Else where I first look for one logo and if it's not found, in the Else clause I look for the second logo.
In either branch, If or Else, I then look for that branch's logo a second time using Find Image to be able to save the location in a variable to be able to click on it.
No matter how I think about it, it appears that I need to look for the image twice, once to determine which logo I'm looking for and a second time to find the topmost one and save it's location.
I can't just look first for one and then the other because if the location is saved by the first Find Image, that will be clobbered when the second Find Image fails.
My thought is that I only want to look for an image once because the internal logic runs a whole lot faster than finding an image. Or is that my imagination? If the coding were simpler to just look for the same image over and over and over, would that really slow things down much?
Any comments on the logic or the performance issues?
Thanks.