Sorry about the double post, and this is for basically.. me learning scar's pascal.
I'm simply trying to get it to find the bank symbol in RS (on the mini map) and click on it even when the image has a white dot (person) on it. But whenever I try this code I am unable to make it work. I simply cannot find the image with this line of code.
Here is my test code. I select the window of mspaint.exe and drag the image in paint to somewhere further in then at 0,0.
SCAR Code:
program findTestTarget;
var
pic,x,y : integer;
b : boolean;
acc : extended;
procedure loadBitmaps;
begin
pic := BitmapFromString(25, 24, 'beNrN1UEKwCAMBMDtb/oOr/0/' +
'/U1pISCiYUnCIpU9eRgihgTg525HD6pnRKZIkKAWEYJmjXI1FVV2I' +
'hQavpzX02M3XHOdEZmSoohj5bmUW3CWMi3rkDf+k1q1AiX/QS21aq' +
'RFuRNssP2TQTv6suDmNVFcXi/8Qvf1');
end;
begin
writeln('Program Begin..');
b:= false; //output result boolean
loadBitmaps;
//My original statement to find the first bitmap
//if( findbitmapin(pic,x,y,0,0,600,600) )then
//The finddeformed bitmap line, doesn't work!
if( findDeformedBitmapToleranceIn(pic,x,y,0,0,600,600,70,0,true,acc) )then
//change the 600,600 to your window search area ^^^
begin
b:= true;
writeln('Bitmap Found');
//Just puts cursor over image
moveMouseSmooth(x,y);
end;
//tells output couldn't find the image.
if(b = false)then
begin
writeln('Bitmap Not Found');
end;
freeBitmap(pic);
writeln('Program end.');
end.
The image in the procedure is the original from the help HTML file, and I'm trying to find a distorted version of it (I.E drew a white dot about 2x2 pixals in it). Do you see what I am doing wrong?