Jump to content
Incommodious

Finding a bitmap

Recommended Posts

Just trying to learn a little more about bitmaps. I watched the tut and it wasnt what i was looking for. Im trying to make a script that if it finds a bitmap i want it to clickmouse(x,y) and I dont know how to make it search for it, like for colors its

[scar] if FindColor(x,y,255,0,0,500,500) then [/scar]

But i want it to search for the bitmap instead of the color.

This is the bitmap i have, and i dont know if it matters that you see it but here it is.

[scar]program Bitmap;

var

Bmp: TSCARBitmap;

begin

Bmp := TSCARBitmap.Create('deNrNmVtQFOkVxxEiLiog1wEc5tI9WslDan1K8' +

'pBKqlK1D1YqlVTleVOlq7guu1qru9mLa1YXoovJqjjAXBi5zICAsojKIogIilF' +

'BFmFBVrlfhzvDAMP0TE/Pl9PTTXfPBQYNmu06D2PT0/2b853z/5+v/U3ALwPQO' +

'h2jXQ81721X7gllouXrBOISRg1tROZY5OhD5H/QXIBzIoi4Kh5USrjLlHvDWmt' +

'U6LUcpN16M/Nt7tH65G1WPW6/F43mfoYItdulS0eB1tG+lSjAyo9GcV/RHcaW5' +

'qdfKeREf4vqQCz3xK5zYqJITo0HoYW/ICeB7PeQ5QCa/wUyS/mAxE5vIMrFExo' +

'Zn9g9oQ/LUl4FoYO0Xz3zJ+4pJYcjLfk42RgBGGhhN5oLoj9wMRuAxjei0TfQc' +

'AgaCEWDW+CzoyPMasDvHOd/5tTw0/WFHOqsF6ZiVCUlCjGnKcCNjcGb2IjGg2m' +

'2pyLvcHaIbGWy+Vwsay97q/UipChH8cnfcYTXPoqCNDraQj0JfUZ3hE9aqjHOk' +

'o+tI2fXo1KOMOud0OEMCXFFimYC1gQJMbzFG9LWFNdzXtp1VrwunLYls/6TNzn' +

'Iyk+jlyCNzzavlZCJ3nAPyOH8xK5z0tEsmeH9bXDbe5c++18gW6qUHKHqHboab' +

'RUJztmAF4OcChQSLt0XASETi3l4huvmTsrxcoTWRZNQvWu/iCUMONUf/GKEEGO' +

'bhJCDukQOEsKoksLNM/dFvhzk/cvHeSlOCpvJlttux6K5EDT/5gsQQrN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UJUlqCk9VSRw1t+reWXynQTb0/2m5dXMe3nRb' +

'zROmptzTvbdcdkrOv308nWHIVo6nLMvuVm8yChwpNn8YuxowqqXofn8am62mv7' +

'i335GCb8L0i7KdmlGwNmDMUPjjB9G/IoPWufcRvdTXJ4tfwvwaTQ+3qg7ySNJw' +

'Q0Yn9Jz58AvfgpO5IwPT7lRKVoKl/fFCMXuNRrU3iHg1NAftckFm2ocD070nAu' +

'WAgLzvCp/HSF78mbUvotR+wbclK4pui5lgs6/6u3oE5IUPQen2tVej/ejy48iU' +

'vg/vCjFlSKNrCDyK4k2Vpf6QcJPoJHE6K8hAuLsDa0E/s6KjPExLeVO9Z3/vX1' +

'dWt163mp4cf3/h3W632hd4Jr/H4L/6cyGA=');

DebugBitmap(bmp);

end.

[/scar]

Link to comment
Share on other sites

Not sure what you are making this for, but... Something like this:

 

program Bitmap;
var
 x, y: Integer;
 Bmp: TSCARBitmap;
begin
 Bmp := TSCARBitmap.Create('deNrNmVtQFOkVxxEiLiog1wEc5tI9WslDan1K8' +
   'pBKqlK1D1YqlVTleVOlq7guu1qru9mLa1YXoovJqjjAXBi5zICAsojKIogIilF' +
   'BFmFBVrlfhzvDAMP0TE/Pl9PTTXfPBQYNmu06D2PT0/2b853z/5+v/U3ALwPQO' +
   'h2jXQ81721X7gllouXrBOISRg1tROZY5OhD5H/QXIBzIoi4Kh5USrjLlHvDWmt' +
   'U6LUcpN16M/Nt7tH65G1WPW6/F43mfoYItdulS0eB1tG+lSjAyo9GcV/RHcaW5' +
   'qdfKeREf4vqQCz3xK5zYqJITo0HoYW/ICeB7PeQ5QCa/wUyS/mAxE5vIMrFExo' +
   'Zn9g9oQ/LUl4FoYO0Xz3zJ+4pJYcjLfk42RgBGGhhN5oLoj9wMRuAxjei0TfQc' +
   'AgaCEWDW+CzoyPMasDvHOd/5tTw0/WFHOqsF6ZiVCUlCjGnKcCNjcGb2IjGg2m' +
   '2pyLvcHaIbGWy+Vwsay97q/UipChH8cnfcYTXPoqC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D84lWAXYI8AETplcn' +
   'W+hBoNnM3BAnf5GwSYW6uFJnO+BpzmOKMT9QpIt4T46cSTE427jV6BspH0XpCA' +
   '4wPbkViYQqZJoLzDnyIHEXiOiXdteiizv0kJhoDkhjKm4VbeTTextMepwqyXbd' +
   'an/NJYlrihoglqyNYm609nCntTIdQfCgW3RNAac+k93wedbn8cQOa4lzmPsewO' +
   'a2QCj79AJFnX4Kx4VWszZ6krjI2g6zH8aO7f4hoQRWgA5WiAWCgIIlHDSu1v4M' +
   'fNPswqfU7LVaCtPhDIGjIl/sZw06kmc5WSuKZH7JbRdF/ueTsEUBKZvaYjrOi/' +
   'xEi7aTLM/kDKcg+23Wc4cDGBGUjiYHVQTLQ4cJ8T4aQFqnsJ2GXNUey46WSlzn' +
   'cQdfZuQ906kP8xDNAa0Ym91HVfLvj1C22i94Sg3cuQc+Tldrl8nsDwncIuGTSy' +
   'hx6FBTJk86tyF5bbK3WErxtB9iTCoOglRhNmqEmBH6Wn6Xq7qmp18u8BCLs5kb' +
   '3qkk/P01posOFN0KGImnedZyFLwqSvGILGjKeyfrDrXr4B6LsQ5QmeDxF4uh3K' +
   'lekLcTL/Th+k72nzPTlxMaWXe25C5iV5WnfLcVpkTT2aVYU3Navr8FKdUBgUD6' +
   'bgtBdWyVcezQ/5YMHoeuZLSmqr9mL5RJb/+MW3xpad3ewwhMEvDeZiEhY1Do2Y' +
   'LUKH89AqrXjGWhnNnqLsSogSj3y0MbERTYPrbVvECskXUp1otjd2uFe85L2a2I' +
   'TOjzzw4i0/+nklp97nExVyckyNBW7Gc0F9EvoIO5owBt9fHwPDg1/RnKxIY04d' +
   'ZDjZuszra8cFemYDPYP1QXYXvR7AbsaQYymu7ZLdZuVGk6HAEfGv6PNc4XE8pb' +
   'KVy9nOOi7lETj0P82v69u9FYzmSGR0GrreKiP1wht+Iwfqaxnt8DsmQ5Iy94dy' +
   'VbWkJ8OtAMyG3bOPoFWSFDHrflL5cn4U4yOxqkGD6tWK/MmvJw7TLUxxEwbFf+' +
   'X3XUZN9gLvekBxuuigHMLOS5XRUyhhFhd63LpcuWSv2PZm0ikCj/EI+So0Xbo6' +
   'M3Y1r3MTNGJ9rk/kleJxKqz1dlnr6trB2XPUuqpdLIp91Un6tbyb6JYRpXLjLq' +
   'Mx8+yU2xQ1Fn7ltinVy4GxKjS8+FDFxRiAIGl4QyCqJa3aKh8HAL2T9P/jXdKp' +
   '340xj3S/9GsRinsr5cKdwUej93d7QeY1CqF18Vl2J9Us4oZEKq7HOcGRd3n01V' +
   '6Z7oE5qZLNKN5kVzidA4rwrsZUJUlqCk9VSRw1t+reWXynQTb0/2m5dXMe3nRb' +
   'zROmptzTvbdcdkrOv308nWHIVo6nLMvuVm8yChwpNn8YuxowqqXofn8am62mv7' +
   'i335GCb8L0i7KdmlGwNmDMUPjjB9G/IoPWufcRvdTXJ4tfwvwaTQ+3qg7ySNJw' +
   'Q0Yn9Jz58AvfgpO5IwPT7lRKVoKl/fFCMXuNRrU3iHg1NAftckFm2ocD070nAu' +
   'WAgLzvCp/HSF78mbUvotR+wbclK4pui5lgs6/6u3oE5IUPQen2tVej/ejy48iU' +
   'vg/vCjFlSKNrCDyK4k2Vpf6QcJPoJHE6K8hAuLsDa0E/s6KjPExLeVO9Z3/vX1' +
   'dWt163mp4cf3/h3W632hd4Jr/H4L/6cyGA=');  
 Bmp.TranspColor := 16777215;
 DebugBitmap(Bmp);     
 Wait(500);
 if FindBitmap(x, y, Bmp, 0, 0, 500, 500) then
 begin
   WriteLn('Found!');
   MoveMouse(x, y); // Set your wanted action[s] here...
 end;  
end.

Link to comment
Share on other sites

Sure, thats possible to do.

 

Here:

 

program Bitmap;

var
 w, h, x, y: Integer;
 Bmp: TSCARBitmap; 
 pt: TPoint;

function GetBitmapCenter(bmp: TSCARBitmap): TPoint;
begin
 Result := BoxCenter(Box(0, 0, bmp.Width, bmp.Height));
end;

begin
 Bmp := TSCARBitmap.Create('deNrNmVtQFOkVxxEiLiog1wEc5tI9WslDan1K8' +
   'pBKqlK1D1YqlVTleVOlq7guu1qru9mLa1YXoovJqjjAXBi5zICAsojKIogIilF' +
   'BFmFBVrlfhzvDAMP0TE/Pl9PTTXfPBQYNmu06D2PT0/2b853z/5+v/U3ALwPQO' +
   'h2jXQ81721X7gllouXrBOISRg1tROZY5OhD5H/QXIBzIoi4Kh5USrjLlHvDWmt' +
   'U6LUcpN16M/Nt7tH65G1WPW6/F43mfoYItdulS0eB1tG+lSjAyo9GcV/RHcaW5' +
   'qdfKeREf4vqQCz3xK5zYqJITo0HoYW/ICeB7PeQ5QCa/wUyS/mAxE5vIMrFExo' +
   'Zn9g9oQ/LUl4FoYO0Xz3zJ+4pJYcjLfk42RgBGGhhN5oLoj9wMRuAxjei0TfQc' +
   'AgaCEWDW+CzoyPMasDvHOd/5tTw0/WFHOqsF6ZiVCUlCjGnKcCNjcGb2IjGg2m' +
   '2pyLvcHaIbGWy+Vwsay97q/UipChH8cnfcYTXPoqCNDraQj0JfUZ3hE9aqjHOk' +
   'o+tI2fXo1KOMOud0OEMCXFFimYC1gQJMbzFG9LWFNdzXtp1VrwunLYls/6TNzn' +
   'Iyk+jlyCNzzavlZCJ3nAPyOH8xK5z0tEsmeH9bXDbe5c++18gW6qUHKHqHboab' +
   'RUJztmAF4OcChQSLt0XASETi3l4huvmTsrxcoTWRZNQvWu/iCUMONUf/GKEEGO' +
   'bhJCDukQOEsKoksLNM/dFvhzk/cvHeSlOCpvJlttux6K5EDT/5gsQQrN3RnOE8' +
   '7XxXeckQsjhTFn15zFsV579q4O0rZ3QYp4Uyk5jSjxhwJzGILT4ZzQXtiY80Ki' +
   '+MLembhf1q93SyMRcDtabnih83OTAk7VAttVqhSY4o5Pb74IJBiJ7LVr47RqaO' +
   'gQ9i/ToF1NVvDchE9ZLcvL78IVc7NsPI7nnXk75A2knViJ0Op3NFd8wV0JhN6b' +
   'GEcUy50QgMstc7nxwRTbGbn6M9pYdslXUkylZCRIUiXx6HM1FwU1A4vovSEDuO' +
   'Nrel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zvCp/HSF78mbUvotR+wbclK4pui5lgs6/6u3oE5IUPQen2tVej/ejy48iU' +
   'vg/vCjFlSKNrCDyK4k2Vpf6QcJPoJHE6K8hAuLsDa0E/s6KjPExLeVO9Z3/vX1' +
   'dWt163mp4cf3/h3W632hd4Jr/H4L/6cyGA=');  
 Bmp.TranspColor := 16777215;
 DebugBitmap(Bmp);     
 Wait(500);
 if FindBitmap(x, y, Bmp, 0, 0, 500, 500) then
 begin
   WriteLn('Found!');
   pt := GetBitmapCenter(Bmp);
   x := (x + pt.X);
   y := (y + pt.Y);
   MoveMouse(x, y); // Set your wanted action[s] here...
 end;  
end.

 

..or...

 

program Bitmap;

var
 w, h, x, y: Integer;
 Bmp: TSCARBitmap; 

begin
 Bmp := TSCARBitmap.Create('deNrNmVtQFOkVxxEiLiog1wEc5tI9WslDan1K8' +
   'pBKqlK1D1YqlVTleVOlq7guu1qru9mLa1YXoovJqjjAXBi5zICAsojKIogIilF' +
   'BFmFBVrlfhzvDAMP0TE/Pl9PTTXfPBQYNmu06D2PT0/2b853z/5+v/U3ALwPQO' +
   'h2jXQ81721X7gllouXrBOISRg1tROZY5OhD5H/QXIBzIoi4Kh5USrjLlHvDWmt' +
   'U6LUcpN16M/Nt7tH65G1WPW6/F43mfoYItdulS0eB1tG+lSjAyo9GcV/RHcaW5' +
   'qdfKeREf4vqQCz3xK5zYqJITo0HoYW/ICeB7PeQ5QCa/wUyS/mAxE5vIMrFExo' +
   'Zn9g9oQ/LUl4FoYO0Xz3zJ+4pJYcjLfk42RgBGGhhN5oLoj9wMRuAxjei0TfQc' +
   'AgaCEWDW+CzoyPMasDvHOd/5tTw0/WFHOqsF6ZiVCUlCjGnKcCNjcGb2IjGg2m' +
   '2pyLvcHaIbGWy+Vwsay97q/UipChH8cnfcYTXPoqCNDraQj0JfUZ3hE9aqjHOk' +
   'o+tI2fXo1KOMOud0OEMCXFFimYC1gQJMbzFG9LWFNdzXtp1VrwunLYls/6TNzn' +
   'Iyk+jlyCNzzavlZCJ3nAPyOH8xK5z0tEsmeH9bXDbe5c++18gW6qUHKHqHboab' +
   'RUJztmAF4OcChQSLt0XASETi3l4huvmTsrxcoTWRZNQvWu/iCUMONUf/GKEEGO' +
   'bhJCDukQOEsKoksLNM/dFvhzk/cvHeSlOCpvJlttux6K5EDT/5gsQQrN3RnOE8' +
   '7XxXeckQsjhTFn15zFsV579q4O0rZ3QYp4Uyk5jSjxhwJzGILT4ZzQXtiY80Ki' +
   '+MLembhf1q93SyMRcDtabnih83OTAk7VAttVqhSY4o5Pb74IJBiJ7LVr47RqaO' +
   'gQ9i/ToF1NVvDchE9ZLcvL78IVc7NsPI7nnXk75A2knViJ0Op3NFd8wV0JhN6b' +
   'GEcUy50QgMstc7nxwRTbGbn6M9pYdslXUkylZCRIUiXx6HM1FwU1A4vovSEDuO' +
   'NrelhvekAuzRpgHuGtgOeyPI+jlsyqRk0LUwIrl9yzKp3pDTF1LWImQCdNFjDL' +
   'GITPG3M3xfPNiHlbxd35E0X+yy7pAjyiUg3RSVEPJMUHLhM/q5LZrYicIuOVv7' +
   'M9Y3O2GNxmEesJXwoOwPxb1KCWrEPamS8HI7N+J0dBmupJBWiEGtqKRN4ir0gG' +
   'lRL0/jOFp/u4s09RZ+6M5yOZT8UQBTo0HEnkK4uIORyco+WZEzfKEMEs8jVmFE' +
   'GKseDvX1INK6bhaDnkDkQRrgA9Q8NPZcpj9qJFgb+Wno0PkaIyHC8BN6C4uPwW' +
   'cmoMJDKEheRvMA+T9KLplbHqiaBdxcScdpRLnZCBdAEPgerGrE1ofxo1opdNaO' +
   'eSKMChWCvuDSMQNLcZNvkeUdpG1AOc4Gcgf0mD8lqMp+OJWZp3tjW8NfYkvaXc' +
   'wtOQdMcw2qxDCX+2VklXY2IDGnNrgqWBed3O0irrSpZBSD84lWAXYI8AETplcn' +
   'W+hBoNnM3BAnf5GwSYW6uFJnO+BpzmOKMT9QpIt4T46cSTE427jV6BspH0XpCA' +
   '4wPbkViYQqZJoLzDnyI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qz1dlnr6trB2XPUuqpdLIp91Un6tbyb6JYRpXLjLq' +
   'Mx8+yU2xQ1Fn7ltinVy4GxKjS8+FDFxRiAIGl4QyCqJa3aKh8HAL2T9P/jXdKp' +
   '340xj3S/9GsRinsr5cKdwUej93d7QeY1CqF18Vl2J9Us4oZEKq7HOcGRd3n01V' +
   '6Z7oE5qZLNKN5kVzidA4rwrsZUJUlqCk9VSRw1t+reWXynQTb0/2m5dXMe3nRb' +
   'zROmptzTvbdcdkrOv308nWHIVo6nLMvuVm8yChwpNn8YuxowqqXofn8am62mv7' +
   'i335GCb8L0i7KdmlGwNmDMUPjjB9G/IoPWufcRvdTXJ4tfwvwaTQ+3qg7ySNJw' +
   'Q0Yn9Jz58AvfgpO5IwPT7lRKVoKl/fFCMXuNRrU3iHg1NAftckFm2ocD070nAu' +
   'WAgLzvCp/HSF78mbUvotR+wbclK4pui5lgs6/6u3oE5IUPQen2tVej/ejy48iU' +
   'vg/vCjFlSKNrCDyK4k2Vpf6QcJPoJHE6K8hAuLsDa0E/s6KjPExLeVO9Z3/vX1' +
   'dWt163mp4cf3/h3W632hd4Jr/H4L/6cyGA=');  
 Bmp.TranspColor := 16777215;
 DebugBitmap(Bmp);     
 Wait(500);
 if FindBitmap(x, y, Bmp, 0, 0, 500, 500) then
 begin
   WriteLn('Found!');
   MoveMouse((x + Bmp.Width div 2), (y + Bmp.Height div 2)); // Set your wanted action[s] here...
 end;  
end.

Link to comment
Share on other sites

Sweet and btw im just trying to learn and understadn scripting better and im making a bunch of simple scripts for a facebook flash game Dragon City. And another problem i run into is the when i start the script usually i will do GetClient.Activate but when i do that with FireFox when its in full screen it will select the client and bring it up over everything els like normal but it makes the client in a smaller window and it isnt in fullscreen sized anymore. How can i fix that?

Link to comment
Share on other sites

Sweet and btw im just trying to learn and understadn scripting better and im making a bunch of simple scripts for a facebook flash game Dragon City. And another problem i run into is the when i start the script usually i will do GetClient.Activate but when i do that with FireFox when its in full screen it will select the client and bring it up over everything els like normal but it makes the client in a smaller window and it isnt in fullscreen sized anymore. How can i fix that?

 

Firefox in particular. Has problems with SCAR's window api. I've experienced problems constantly...recently with that damn fishing script on that facebook game.

 

I have a tutorial I think I called it the FindColor tutorial. They are all in the tutorials section on the forums.

Link to comment
Share on other sites

I have a tutorial I think I called it the FindColor tutorial. They are all in the tutorials section on the forums.

 

What is the tut for exactly? :D

 

EDIT: I found it and watch it but i dont see how this helps? Unless I watched the wrong one. http://forums.scar-divi.com/showthread.php?1973-LordJashin-s-FindColor-Tutorial

Edited by Incommodious
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...