djzombies Posted September 1, 2015 Share Posted September 1, 2015 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. Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 2, 2015 Share Posted September 2, 2015 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. Quote Link to comment Share on other sites More sharing options...
djzombies Posted September 3, 2015 Author Share Posted September 3, 2015 (edited) 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 September 3, 2015 by djzombies Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 17, 2015 Share Posted September 17, 2015 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. Quote Link to comment Share on other sites More sharing options...