In version 3.8 of RoutineBot you will find some new functions that allow to process the case when you have the same images on the screen:
- MouseFocuseNext
- PicturesCount
Example:
program test;
function PicturesCount(PictureName : String): integer;
begin
result := 0;
if MouseFocuse(PictureName) = 1 then
begin
result := result + 1;
while MouseFocuseNext(PictureName) = 1 do
begin
result := result + 1;
end;
end;
end;
begin
picture := ‘Sample.bmp’;
s := picture + ‘ : ‘ + PicturesCount(picture);
showMessage(s);
picture := ‘Sample 2.bmp’;
s := picture + ‘ : ‘ + PicturesCount(picture);
showMessage(s);
end.
Leave a Reply