Hi there guys, long time no speak :-) Im having an issue, which took me a long time to debug, as normally I only execute this function call maybe 15 times, sometimes it does a few more. So for a long time it appeared as if simply put, sometimes it works and sometimes it doesnt. Anyway To cut a long story short, this is my piece of debugging code ************************** Start Code $Counter = 0 While 1 = 1 $Counter = $Counter + 1 $Qty = _TesseractScreenCapture(0,"",1,2,1096,1677,1658,1048,0) $Qty = StringLeft($Qty, 2) $Qty = Number($Qty) Sleep(200) If $Qty = 0 then ExitLoop WEnd MsgBox(0,"Msg", $Counter) End Code *********************************** Basically, it ends at 24 every time. Whats happening is, the 24th Call and onwards, Tesseract is returning a blank tif image and therefore $Qty becomes 0. It was strange how it sometimes just refused to work and returned a 0, until I figured out what was happening. So Im guessing all I need to do is clear the memory after every call? _TesseractScreenCapture Function calls the standard UDF as taken from the following link The reason im posting it here, is because I dont think it is a problem with the Tesseract.au3 file I am using, but rather How I am calling the function and not releasing the memory? Is there a different way of calling the function so this doesnt keep happening? Any help greatly appreciated Thanks S