OR!
SCAR Code:
if (FindBitmap(Thecoolestbitmap, x, y))then
Writeln('Found It');
MMouse(x,y,1,1);
GetMousePos(x,y);
Mouse(x, y, 1, 1, True);
Flag;
FreeBitmap(Thecoolestbitmap);
if not (FindBitmap(Thecoolestbitmap, x, y))then
Writeln('Didnt find it, using backup bitmap.');
//backup bitmap thing here (used the same way the one above is)
//other stuff here.
COULD be changed to
SCAR Code:
if (FindBitmap(Thecoolestbitmap, x, y))then
begin
Writeln('Found It');
MMouse(x,y,1,1);
GetMousePos(x,y);
Mouse(x, y, 1, 1, True);
Flag;
FreeBitmap(Thecoolestbitmap);
end else
Writeln('Didnt find it, using backup bitmap.');
//backup bitmap thing here (used the same way the one above is)
//other stuff here.
Like that, Remember to always put begin and end inside your if and then's