OK, update. Still can't get it to recognize a bitmap, but using keyboard commands works fine, as do using Mouse move/click functions.
This is essentially the code, with other things removed, for debugging. If you notice the value in bold red, at 441 it does not detect the image at all when it shows. If I change it to one number higher, 442, then it falsely detects it every time it runs through.
What are the possible issues of why it won't detect?
Code:
// beginning of the program, declaration of variables, misc procedures to load/free resources etc
...
// Excerpt for the captcha variable used below.
var captcha: integer;
captcha := BitmapFromString(314, 92, 'allthetextcharactersforthebitmap');
...
begin
ActivateClient;
LoadBitmaps;
repeat
if(FindBitmapToleranceIn(captcha,x,y, 350, 200, 900, 500, 441)) then
begin
PlaySound('C:\Bin\Simba\Scripts\eagle_spot.wav');
Wait(5000);
end
until false;
FreeAllBitmaps;
end.
Here is the actual bitmap:
captcha.png
Thanks,