KM v11.0.4 has changed which "brand" of OCR the KM Engine uses for its conditional tests. I've tried it out, and it is now a little over 100% faster, due to the fact that Apple OCR is faster than Tesseract. I can now change all my existing code to conduct the test in an IF statement instead of creating an extra OCR action and testing the result of that action using a text condition.
You are already using Apple's OCR in that action, so there is nothing to speed up. However when I do that sort of thing, I just use KM's built-in clipboard change trigger to capture screenshots, rather than capture the screenshots using a KM action.
Your second piece of code isn't even using OCR, so it would be unaffected.
I'm not sure if you understand what has been improved by this change. Here is an example of code that will now run over twice as fast:
That is great. I just replaced that with my screen capture for text, and with the clipboard manager, I can get both every time. That is handy; thanks for sharing.
I hadn't gone through all those If statements for the clipboard before. There are so many great things to go through and try to remember. I am glad there are solutions to most things we can dream up.