If (FindBitmap(copper, X, Y)) Then //This will search the screen for the bitmap
Writeln('Found the copper bitmap') //Tells us it found it
Else
Writeln('Could not find copper'); //Tells us we didn't find it
End;
[/Simba]
__________________________________________________ __________________________________________________ _____________________________
Simba Code:
FindBitmapIn(copper, X, Y, 0, 0, 100, 100);
This will search for the bitmap in a defined area of your screen. In this example it will search for the bitmap from 0, 0 to 100, 100
__________________________________________________ __________________________________________________ ______________________________
[simba]
If (FindBitmapToleranceIn(copper, x, y, 0, 0, 100, 100, 25)) Then
Begin
Writeln('Found the copper bitmap') //Tells us it found it
Mouse(X, Y, 5, 5, true); //Clicks the bitmap with a randomness of 5, 5
FreeBitmap(copper); //This then frees the bitmap
End
__________________________________________________ __________________________________________________ ______________________________
MY SCRIPT
program sn;
var
S, X, Y:Integer;
begin
S := BitmapFromString(10, 16, 'meJy9lGtIk1EYx1OzL5VdkS4KXY' +
'joQxFA==');
If (FindBitmapIn(S, x, y, 0, 0, 100, 100)) Then
Writeln('Found the item bitmap') //Tells us it found it
movemouse(X, Y, 5, 5, true); //Clicks the bitmap with a randomness of 5, 5
FreeBitmap(S); //This then frees the bitmap
Else
Writeln('Could not find item'); //Tells us we didn't find it
End;
Error: Operator expected at line 12
Compiling failed.
__________________________________________________ __________________________________________________ _______________________________
heres another way i tried it
Begin
S := BitmapFromString(10, 16, 'meJy9lGtIk1EYx1OzL5VdkS4KXY' +
'joQxFA==');
If (FindBitmapIn(S, x, y, 0, 0, 100, 100)) Then
Writeln('Found the copper bitmap'); //Tells us it found it
movemouse(X, Y, 5, 5); //Clicks the bitmap with a randomness of 5, 5
FreeBitmap(S); //This then frees the bitmap
Else
Writeln('Could not find copper'); //Tells us we didn't find it
End;
Error: Found unexpected token "Else", expected "End" at line 16
Compiling failed.
__________________________________________________ __________________________________________________ ________________________________
THIS IS THE ONLY WAY I COULD MAKE IT WORK BUT IT ALWAYS CLICKS (0, 0) PART OF THE BITMAP
program sn;
var
S, X, Y:Integer;
begin
S := BitmapFromString(10, 16, 'meJy9lGtIk1EYx1OzL5VdkS4KXY' +
'joQxFA==');
If (FindBitmapIn(S, x, y, 0, 0, 100, 100)) Then
Writeln('Found the item bitmap'); //Tells us it found it
movemouse(X, Y); //Clicks the bitmap with a randomness of 5, 5
FreeBitmap(S); //This then frees the bitmap
End;
Compiled successfully in 717 ms. <<<<<<BUT I HAD TO REMOVE THE 5, 5 RANDOMNESS AND THE ELSE FOR THE WRITELN (COULD NOT FIND ITEM)
__________________________________________________ __________________________________________________ ____________________________
ALL I WANNA DO IS FIND BITMAP IN THE DEFINED AREA WITCH I HAVE AND HAVE A RANDOMNESS OF WHERE THE MOUSE MOVES AND CLICKS ALSO I WOULD LIKE TO HAVE THE WRITE LINE FEATURE SAYING IF IT FOUND THE IMAGE OR IF IT DIDNT AND FREE THE BITMAP