So I want to use Pause Until to validate the prior field on a webform has the correct entry before moving on. But I notice in this scenario it still proceeds with a 9% green match.
is there a way to make it a 98% or higher match so it fails unless it's almost a perfect match?
is there an error I can throw out that does a popup to the user to say the macro failed because the match of the prior field was not correct?
There is a fuzz selector bar in each Find Image condition or action that lets you say how "close" the search needs to be. Move the bar to the left for 100% matching.
What you are trying to do may work (I use Find Image a lot) but I think you would be better off doing an OCR comparison. Apple's OCR is almost as fast as Find Image (and consumer a lot less memory.)
Something like this: (doing it with "Execute Actions Until" is better than using a Pause Until action. Trust me.)
Yes, and since there aren't any bitmaps stored in your macro, it should make the KM Editor more responsive.
Well, I guess you could, using the Highlight action, (see below) and using the same frame values as you used in the OCR action. You can add the following action after the above action... and it would draw the box after finding the match. I've never bothered, but it should work. The Highlight action doesn't have a flag for "asynchronous" display, so if you wanted it to run asynchronously like the Find Action green boxes, you will need to put the Highlight action into another macro and run it asynchronously. I don't see much value in doing this, however.
OOPS, in the action above, replace the word "target" with "rectangle."
As well as @Airy's excellent suggestion, you could also split your image detection into two -- one match for each field -- and "Pause Until" both conditions are satisfied.
The reason being that when you consider it as only one image there is a a huge % that matches -- labels, white space, etc, etc. -- effectively overwhelming the differences. Reduce the areas involved and that won't be such a problem.
(Depending on the browser you may also be able to do this by getting field values with JavaScript, which would be even more accurate.)
It's a delightful action. (Although it needs an asynchronous flag, and a choice of colours, and a transparency value, and a separate colour for the inside of the frame, and a way to let me specify the rectangle using a variable containing a rectangle instead of four separate values.)