spartakos Posted January 27, 2014 Share Posted January 27, 2014 (edited) 1 Edited February 11, 2014 by spartakos Quote Link to comment Share on other sites More sharing options...
Janilabo Posted January 27, 2014 Share Posted January 27, 2014 Ello spartakos, That is a nasty way of creating the bitmaps (inside loop), you never even free them... You will quickly get SCAR out of memory with this script! Fixed the bitmap creation problem: var Bmp1, Bmp2, x, y: Integer; begin Bmp1 := TSCARBitmap.Create('deNoTZuBgaGD4P4qGAQIA7QLjhA=='); Bmp2 := TSCARBitmap.Create('deNrjY+Bj+N/gMIpGEVUQAKBMVmg='); repeat if FindBitmapTol(x, y, Bmp1, 82, 125, 1158, 770, 50) then begin MoveMouse(x, y); ClickMouse(x, y, mbRight); // mbLeft to use Left Mouse Button! TypeText(Chr(32)); end; if FindBitmapTol(x, y, Bmp2, 82, 125, 1158, 770, 50) then begin MoveMouse(x, y); ClickMouse(x, y, mbRight); TypeText(Chr(32)); end; until False; end. Sadly I don't know what is the actual problem you are asking here, but could it be that you simply need a small delay between the bitmap lookups? Also, please always use CODE or SCAR tags. Quote Link to comment Share on other sites More sharing options...