Jump to content
djzombies

FindBitmap Function

Recommended Posts

I am trying to find a piece of image by using this function but it just works on when there is only the bitmap image on screen not on all image just the piece of that i give on FindBitmap(x,y,Bitmap,x1,y1,x2,y2)

I use it like that

 

 


program New;
var
         c1:TSCARBitmap;
         x,y,x1,y1,x2,y2:Integer;
begin


    c1:=TSCARBitmap.Create('');
    c1.LoadFromPng(ScriptPath + 'c1.png');

    x1:=492;
    y1:=472;
    x2:=587;
    y2:=567;

   if FindBitmap(x,y,c1,x1,y1,x2,y2) then
   begin
   writeLn( 'X:'+ IntToStr(x) + 'Y:' +IntToStr(y) );
   end;  

end.

 

is there any other function for searching image on screen but it will search for the piece of image.

thanks.

Link to comment
Share on other sites

I don't quite understand what you're asking... FindBitmap will find the bitmap you pass to it on whatever client you have selected, which by default is the desktop. The x and y coordinates you pass to it is the area you want to search in, relative to the upper-left corner of the client you have selected.

Link to comment
Share on other sites

I don't quite understand what you're asking... FindBitmap will find the bitmap you pass to it on whatever client you have selected, which by default is the desktop. The x and y coordinates you pass to it is the area you want to search in, relative to the upper-left corner of the client you have selected.

 

yes it searches but for example if i am searching a piece of image in the screen it cant find but if i just put the bitmap on screen and search for, it founds , but i need the find the bitmap in a image on the screen

Edited by djzombies
Link to comment
Share on other sites

yes it searches but for example if i am searching a piece of image in the screen it cant find but if i just put the bitmap on screen and search for, it founds , but i need the find the bitmap in a image on the screen

 

Well, you have to select the window in which you want to search.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...