Good point about the Safari.. haven't thought about it.
I'm not that huge expert, this is why I just import the macros and edit only the path... In your case I see you used different variable, which you set in the first step:
Set Variable - LOCAL__Screen
This needs to be the same variable in the Shell Script execution, there you used "Var"...
i.e. in the Shell script - change the save to variable to be LOCAL__Screen, then in the last step it will be %Variable%LOCAL__Screen%
Then it should work... Or just really copy/paste my setup
As much as I prefer KM for everything, I ended up strictly using a Shortcuts for this. I mapped it to cmd-shift-2 and it works well, though it can be a bit slow to launch sometimes (it might take 1-3 seconds). I actually forgot I did this as a Shortcut and spent a lot of time trying to find my KM macro for this before figuring out it wasn't a KM macro.
Quite good idea as well... I don't know how you got the first line with Receive Any input from Quick actions... but I just skipped it...
I just used KM to trigger shell script to run the shortcut and it does the same as the other macro, with the only difference that now there's a popup saying what's the output of the macro, which is weird, but for me a good result too..
About 1-3 seconds delay.. using KM to trigger the Shortcut - I see no delay at all, it's just instantaneous. Thanks for sharing your solution!
if you click on the shortcut and then the "settings" button up top and select "use as quick action" the "receive any..." appears. Thats also how you can assign a keyboard shortcut for it. This way seems to work for me vs the other above only difference is you cant select the portion of the screen
under the interactive screenshot click on 'show more' and selection should be Custom. Thanks for the Quick Actions hint.
I can't get the shortcut to run consistently with a keyboard shortcut. As @edjusted mentioned - there's delay and for me depending in which app I'm trying it, the delay is indeed between 1 to 3 seconds.
All in all, I'm happy that I've learned something new, but I'll stick with KM + Shortcut. This way it works flawlessly
I'm actually finding it quite a bit slower than KM's own OCR. Is that your experience too? Probably to do with having to write a file first. Shame there isn't a way to directly OCR a defined area within Shortcuts...
I have this as well and find it invaluable. (Someone on Zoom is showing a Google doc and I can grab the URL from the image)
What really seals the deal for me Neil is using your long-press trick. I've got a function key mapped to "Copy" and if I hold it down a bit it becomes "Select a range and copy the OCR of what you find"
I've noticed that, although what it does capture tends to be more accurate, the Monterey version doesn't like short numbers. Presumably it doesn't recognise them as characters because there's an insufficient pattern.
I run into the same problem with capital "I" if it's a skinny non-serif font, even when it's in the middle of a sentence.
I've found that sometimes, it might help to capture some "noise"...like if the numbers are surrounded by a box or something like that, capturing the box or even part of the box seems to help the OCR understand that single characters (especially "ones" and "I's") aren't just debris. YMMV of course.