-chaos-
2006-06-14 19:30:13
function ClickHereToPlay : Boolean;
var C, RedSquare, RedLine, RedSquare2 : Integer;
begin
C := BitmapFromString(6, 10, 'z78DA33304000370C60804316977A' +
'4C5DF84D18FC6A88F1BB011161080044EB50E9');
[COLOR="lime"]The "C" from "Click Here To Play"[/COLOR]
RedSquare := BitmapFromString(2, 2, '5506015A15083B03004802' +
'00');
[COLOR="lime"] A 2 x 2 bitmap of the background[/COLOR]
RedLine := BitmapFromString(33, 1, 'z78DA658CC10D80300C0357' +
'72521CCA9322D87FA456751E91F858967D3A12013B3A1CE0EECAF' +
'36BEE5EF7A0AD1AAF2F446FEEC31E5CCABF47BBF834ECAC4EBD6D' +
'A001E2791BD1932FE6EAA9FE09BBEC28B3');
[COLOR="lime"]A 33 x 1 bitmap of the background[/COLOR]
RedSqaure2 := BitmapFromString(4, 4, '5506015A15086B1C096E2' +
'0153B03004802004802005506016B1C096B1C096B1C095A150855' +
'06016B1C096B1C095A1508');
[COLOR="Lime"]A 4 x 4 bitmap of the background[/COLOR]
if (FindBitmapToleranceIn(C, x, y, 3, 3, 515, 338, 5)) or
(FindBitmapToleranceIn(RedSquare, x, y, 3, 3, 515, 338, 5)) or
(FindBitmapToleranceIn(RedSquare2, x, y, 3, 3, 515, 338, 5)) or
(FindBitmapToleranceIn(RedLine, x, y, 3, 3, 515, 338, 5)) then
WWait (100 + Random(60))
Mouse (x, y, 2, 2, true);
Result:=True
FreeBitmap (C);
FreeBitmap (RedSquare);
FreeBitmap (RedSquare2);
FreeBitmap (RedLine);
end;You can also just use the bitmap you find works the best and just keep that one :D