I want to be able to collect text from images but Keyboard Maestro's OCR has never worked well for me. For example, I tried to design the following macro to do OCR on each image within a folder (Desktop/t) and append the result to a text file (Desktop/t/Test.txt) and it rarely would work, generally missing most of the data.
Extract Text from images in a folder.kmmacros (8.0 KB)
So I decided to do some testing with 3 images in that folder, debugging by adding pauses of different lengths (0.5 to 2s) or timestamps inserted during each loop. Below are the images, the expected output as well as several examples of the actual (wrong) output I got. I didn't include the correct output, but believe me, it rarely happened.
What can I do to make this work? I'm using KM 11.0.3 on Mac OS 15.3.2 on a MacAir M3.
Expected result:
BLE-YY1030 2025-03-14 16:40:17
pH:4.08,26.4°C,79.5°F
BLE-YY1030 2025-03-14 16:42:17
pH:4.08,26.4°C,79.5°F
BLE-YY1030 2025-03-14 16:46:17
pH:4.08,26.4°C,79.5°F
Example 1:
BLE-YY1030 2025-03-14 16:42:17
pH:4.08,26.4°C,79.5°F
Example 2:
BLE-YY1030 2025-03-14 16:40:17
pH:4.08,26.4°C,79.5°F
BLE-YY1030 2025-03-14 16:46:17
pH:4.08,26.4°C,79.5°F
Examples with times inserted for debugging:
Example 4:
BLE-YY1030 2025-03-14 16:40:17
pH:4.08,26.4°C,79.5°F
17:12:13
BLE-YY1030 2025-03-14 16:42:17
pH:4.08,26.4°C,79.5°F
17:12:19
BLE-YY1030 2025-03-14 16:46:17
pH:4.08,26.4°C,79.5°F
17:12:25
Example 55:
BLE-YY1030 2025-03-14 16:40:17
pH:4.08,26.4°C,79.5°F
17:09:10
BLE-YY1030 2025-03-14 16:42:17
pH:4.08,26.4°C,79.5°F
17:09:15
17:09:20
Example 6:
BLE-YY1030 2025-03-14 16:40:17
pH:4.08,26.4°C,79.5°F
17:10:19
17:10:24
BLE-YY1030 2025-03-14 16:46:17
pH:4.08,26.4°C,79.5°F
17:10:29
For the curious, this data is from a pH meter with terrible software. The iOS app allows the data to be transferred via Bluetooth to a spreadsheet but while collecting data it constantly drops the signal, losing data. That app can also be run on MacOS but it's not designed to and the feature to transfer data to a spreadsheet doesn't work. However, it doesn't drop the Bluetooth connection and will at least show the data on the screen where I can scroll through and at least see it. So if I can just make a KM macro to scroll through that list and grab the data from the screen I'll have a work around.