Jump to content
kimi18

Find text on image?

Recommended Posts

Hello

 

I search 1 function. I looked that here in the forums a few weeks/months ago, but now sont find :(. With this function, "text" could find in the pictures. (I make picture from text with photoshop, and I find this text on other picture with this function) PLease help, what is that name?

 

(Sorry my english :P)

 

kimi

Link to comment
Share on other sites

These are the only text finding functions, but there is bitmap finding, and color finding. Perhaps you could show us this image of text you are trying to find?

 

Then we could make you something for it maybe. Did you post this function you are looking for ever? If you did you could go to your profile and look at your post history.

 

Check out the scar wiki and tutorials section of the forums.

Edited by LordJashin
Link to comment
Share on other sites

tia.png

This function can find "tiamat" (this picture), but search only text, the background no.

 

I look this function in here (scar forum) and wiki, but now I dont find, I search many many hours, but nothing :(

 

When I first saw, there was no need. And I have not written in the subject, so I look in vain in my previous posts.

 

Here forums, Freddy wrote the function.

Link to comment
Share on other sites

Yes-yes, This picture is from seafight :D

 

I try, but...

program New;

var x,y,pellet:integer;

begin

pellet := BitmapFromString(35, 9, 'ceNpN07uKclEMBeDau+M' +

'FGy+MouKgWPoE4oPY2oiNDEw3jzKtWCiKKCoj43P9Hycgf4pDdvb' +

'Kykp2Tq/Xu9/v5/P5er1eLhffQqGQy+Xy+Xw2m317e4uvYwQHg8H' +

'xeHx/f2+1WsCO2f8MJpxMJjMejwEgIwh5u906nU6pVKpUKofDYb/' +

'fizsCKMopFot85aTDn06nZrMpBU+v1wtmGoABXhX7/T79jUZDulz' +

'439/fbreLEBIGj2PQfn9/k6EFKcPhUIorE9CORHGypYh/fX3FQBg' +

'ZqMIH3u120kniuNIOVRx4PHI/Pz/5tVrNVbvdBlM9dAKoqJAv5Hw' +

'+pxaSWgBIVK4gPz4+giFGNxqN+GDm9vPzI7darWqNbE65XFYCDBi' +

'P6uJ4OHTKckVJNTElNAKmhHi9Xo/3jbpS9Aiw2WwIQKuuY8zNw90' +

'Sm81mmDl4YhmMTiEYHZ0TA/adTqeYQwDZsUVK2I1YlXQ6Hfsmfbv' +

'dunWEjCcmgE6q2olxAEgyK3W9SyqVCph0ETPxfe0GDUYRVMEZ5Kv' +

'VyiSLicXMZVmJGB2jUDrO5XKpqddP4aEpF9faZDKJf4SkeP3XL5B' +

'PLLLW67X274mBqQIvHY+OONEyszmm95dYrL3gYrFwfD6fj8fjH0k' +

'iFz0=');

 

if FindBitmapTolerance(pellet, x,y, 7) then

begin

writeln('ok');

end;

end.

 

this is bed

Link to comment
Share on other sites

You need to set the client using the button. Then use ActivateClient;. Try setting 7 to 8, or 9 or higher if it doesnt work. Make sure the client isn't maximized.

 

There is also FindWindowTitlePart

You could do:

 

[sCAR]

FindWindowTitlePart('Firefox');

ActivateClient;

[/sCAR]

Edited by LordJashin
Link to comment
Share on other sites

[sCAR]

program New;

 

var pellet : integer;

 

procedure LoadBmps;

begin

pellet := BitmapFromString(35, 10, 'ceNplk02KhUAMhA+gP' +

'SPiVkVF7yHikQQRPJjMUrzXFP3xih6nFpLOqySVnxdCyPP8KyL/I' +

'ESnv98RIsiepul5nrZtu66T0fc9fsLDBziJJblCnr8QP8syFxWnK' +

'AryKAp+GyFD5SBYlZ91XYsgYcTCb5qG6td1UYsSaUXyuBAdyQgJ3' +

'J1b0BenSvC0eD2HYUDhvu/uFPEOJ1Cjk7wXU+FiyrjvO3WmhdCpJ' +

'Hpu2yYmfhFkpx1haD5yHschG234LUlKPHNlUP6yLOX5iWBKFgBeq' +

'/EoEK+KSIIp/VaSLtfQjnx+zz/M80zLzsNyUw7jWpYFgreQNuiN8' +

'5MF+5xkiInfBoWYdpok3b46eh2DcwrneXKBPPsI79TL0v1wCSRk0' +

'RawrmtVVbIRxgSck4NUBrZs+KrHcVSgpuTrTa/Of580/Be9dCS9');

end;

 

Procedure move;

var x,y : integer;

 

begin

if(FindBitmapMaskTolerance(pellet,x,y,100,100,1680,1050,15,20)=true) then begin

MoveMouse(x,y);

writeln('FIND');

end;

end;

 

begin

if FindWindowTitlePart('Firefox', false) then

begin

writeln('Firefox OK');

ActivateClient; LoadBmps; move ;

end;

 

end.

[/sCAR]

Link to comment
Share on other sites

Try this:

 

Note that FindBitmapTolerance will look for the bitmap in the entire client area, which we set as the desktop with SetDesktopAsClient;. Same goes for FindBitmap. The Tolerance part means the bitmap's colors can be slightly off by this tolerance number and it will still find the bitmap. So if one color was 0 on the first bitmap, and then on an identical bitmap it was 1, it would still find that bitmap, if the tolerance was set to like 1 or 2 or more.

 

[sCAR]

program kimi18;

var

pellet: Integer;

 

procedure LoadBmp;

begin

pellet := BitmapFromString(35, 10, 'ceNplk02KhUAMhA+gP' +

'SPiVkVF7yHikQQRPJjMUrzXFP3xih6nFpLOqySVnxdCyPP8KyL/I' +

'ESnv98RIsiepul5nrZtu66T0fc9fsLDBziJJblCnr8QP8syFxWnK' +

'AryKAp+GyFD5SBYlZ91XYsgYcTCb5qG6td1UYsSaUXyuBAdyQgJ3' +

'J1b0BenSvC0eD2HYUDhvu/uFPEOJ1Cjk7wXU+FiyrjvO3WmhdCpJ' +

'Hpu2yYmfhFkpx1haD5yHschG234LUlKPHNlUP6yLOX5iWBKFgBeq' +

'/EoEK+KSIIp/VaSLtfQjnx+zz/M80zLzsNyUw7jWpYFgreQNuiN8' +

'5MF+5xkiInfBoWYdpok3b46eh2DcwrneXKBPPsI79TL0v1wCSRk0' +

'RawrmtVVbIRxgSck4NUBrZs+KrHcVSgpuTrTa/Of580/Be9dCS9');

end;

 

procedure Move;

var x, y: Integer;

begin

if FindBitmapTolerance(pellet, x, y, 0) then

begin

MoveMouse(x, y);

WriteLn('FIND');

end;

end;

 

begin

ClearDebug;

LoadBmp;

DebugBitmap(pellet);

SetDesktopAsClient;

wait(1000);

Move;

WriteLn('will leave this up for 5 seconds then close it');

wait(5000);

HideDebugImgWindow;

end.

[/sCAR]

Edited by LordJashin
Link to comment
Share on other sites

I know you do :P.

 

But in order to, you need to show me like a full screenshot of the sea fight game. But if I were you I'd cross out your name.

 

Or if you have Skype or something we could arrange team viewer on there.

 

 

If you select that as client, and use ActivateClient; will the game popup?

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...