Time Difference Calculations.kmmacros (22.3 KB)
I did ocr in this area of the screen without capturing the logo of course
but in the macro i get a wierd error saying it is not the right format .. why i am not getting "9:40 AM" ?
I don't think this has anything to do with KM OCR. I just did an OCR of your image using this MACRO: OCR -- User-Selected Area and it worked fine.
There is no need to store the OCR results to a Named Clipboard since it is just text.
I would use:
Try that and see if it works.
If you still need help with your original error, please post a screenshot of the error notification.
it's working now, i just removed the AM/PM section .. but the problem is that i can't find a way to pause the macro until the ocr is finished, i get errors telling me the ocr wasn't finished and didn't get the text from the screen .. which conditions should i use ?
When you get an error, please post a screenshot of the error.
I don't know for sure, but I would be surprised that KM returns control to the next Action before the OCR is finished. @peternlewis, can you confirm/correct?
here i have split the macro into 2 to make it clearer
ocr qbserve.kmmacros (19.4 KB) Time Difference banner.kmmacros (19.7 KB)
now the text is switching from "00:04" to "Lol oy.." like in the screenshots
here is the error message i get sometimes
Uncheck the "Failure aborts macro" in the Search Action, and add this Action afterward
I'm sorry i don't understand, what do i need to uncheck and where do i need to put this ? i'm sorry for my lack of knowledge in the area
In the Gear Options Menu of the Search Action:
If you look at your second action, you can see that the variable value is noted as:
09:40…
That means the value starts with 09:40
and has more after that (ie, it is truncated).
Since it could just as easily have said it was 09:40 AM
, but it does not, that would seem to imply that the text is actually something like maybe 09:40<RETURN> AM
or something like that (or maybe more, who knows).
Use either the Value Inspector or the Keyboard Maestro Preferences Variables pane to inspect the value of TimeStart and see what it actually is.
Yes, the OCR action will not progress to the next action until it has completed its task.