Comparisons Between Keyboard Maestro and Apple Shortcuts in macOS Monterey

That's not an accurate comparison. The OCR in Monterey would be more akin to the KM action called "OCR Screen," not to the KM action "Find Image." (Although in theory you could use KM's "Find Image" to search for a given letter or word on the screen, but that's a finicky operation. And it's not really OCR.)

I use OCR a lot, and my gut is telling me that the OCR action in Monterey is roughly 100 times faster than the one in KM, and feels more accurate (I haven't properly tested it in this regard.) I mean, Monterey can convert my 4K screen to text in a fraction of a second, while that used to take 10 to 30 seconds in KM. Part of the reason might be the "M1 neural engine" which KM hasn't been able to use so far.

OCR isn't even the best new feature in Monterey that makes KM even better. I'm saving that for another day.

1 Like

Interesting! :grinning:

1 Like

Hey bud- I realize it's been a few since this thread was active, but the official Monterey release was this past couple of weeks and I've been messing a bit with Shortcuts and KM integrations. Regarding your example macro, if I might ask a question? What do you use to monitor for the instances of the "SKIP AD" popups? Or do you just have this macro running constantly when you're using YouTube?
Thanks man.
Btw, Shortcuts has a built-in Screenshot command. Perhaps that too is faster. Certainly less work in fewer steps.

About 12 hours ago I started a new thread with more information including some code. You may want to locate that thread. It should be easy to find on the Forums home page right now.

Yes, I have the macro running constantly when watching Youtube. Bear in mind I update my macros every week so I'm giving you my current answer, not the answer from when I wrote the above post. I have a macro which continuously reads the Safari window for the "SKIP AD" (or "SKIP ADS") text. My most advanced macro actually locates the words, so that even if they change position, such as when a user switches from YouTube's Theater Mode to Default Mode, or when the user moves the browser around the screen, it will still find the words and click on them. It doesn't have to OCR the whole window every second because it figures out where the SKIP AD words are located. However it shouldn't be too difficult for anyone to write a few lines of KM code that monitors a screen for the words "SKIP AD" every second and then clicks on a fixed location when a result appears. This would give you a very simple solution in a couple of lines of code. The following code I just typed up for you... I did NOT test it. It's just here to show you how easy it is to do this. I also assume that you can handle the Shortcut code yourself. I assume you realize that the hardcoded constants in this simple snippet represent the location of the SKIP AD text.

Now the REALLY tricky part is getting rid of the pesky pop-up ads at the bottom of the YouTube screen. They come in various sizes (maybe you hadn't noticed that) and auto-detecting their location is very tough. Even just detecting their presence (if you know where they are) is very tough, but I have had a prototype working. Now that Monterey is out, I plan to rewrite my code because Monterey will help detect them much more easily and reliably.

P.S. The screencapture feature in Shortcuts felt as slow, if not slower, than the one in KM. So I didn't use it.

@Sleepy : Add a ad-blocking rules to your hosts file, and forget about ads with Gas Mask:

But using KM to solve my problems it fun. I wouldn't download someone else's solution when I can solve it myself with KM. The journey with KM is the adventure I want.

I'm not sure what a hosts file editor has to do with blocking Youtube ads. I even watched a video about GasMask and they didn't mention what it has to do with ad blocking.

1 Like

I may have uncovered an issue (or I may have done something silly) with Shortcuts: