I’m having issues using using relative OCR screen scraping in a loop. After a lot of trial I have narrowed the issue down to inconsistency doing the translation for the clipping region. The first time the code runs it correctly scrapes the correct area on the screen, however the subsequent scrap is incorrectly translated. Yes the first thing I tried was to make sure the clipping area is being rest before hand, this is not the issue.
So what I did was to enlarge the scrape area and took screen shots before and after the translation. Immediately after the Find Image it would correctly show the image I was searching for so the clipping region was set correctly. However after the translation the screen shot would be correct the first time around, the second time in the loop it would push the clipping region further left and it would become wider. After a bit of trial and error I was able to use an If statement and a second translation to correct the translation on the subsequent loop (21, 1, -46, -1), however on the third loop I could see that it was continuing to deviate from the required position.
So it appears that the Translate is introducing an additional offset each time. From my experimentation I suspect that the additional offset is some how related to the position from where the OCR finished scraping during the previous Get OCR Text activity.