SRL Archive - Help and Support

Text Grabbing.. help [for a GOOD cause]


Hugolord

2008-08-29 12:21:45

kay, don't go all "n00b" "z0mg" etc, cz I know I suck at scar atm haven't scripted in ages.So if you're gona write something like that please just press the back button.

I'm trying to automate a game at "freepoverty.com" where you give 10 cups of water to children in africa for each correct answer, now my plan was to read the text which would be the hardest part IMO but I'm kinda stuck there.

here's a pic:


I think I would need to create a folder with all the bmps of the letters and then use GetTextAtEx but I'm not sure how to use GetTextAtEx or how to writeln the result in any case.

any help?

Waddo

2008-08-29 12:30:00

actually
i think that is a standard font and w may already be able to read it with out creting the bmps

2 secs i will check

edit: yes itsarial 2 secs i will try make one

Hugolord

2008-08-29 12:39:49

From: Waddo
actually
i think that is a standard font and w may already be able to read it with out creting the bmps

2 secs i will check

edit: yes itsarial 2 secs i will try make one


ok thanks :D

Waddo

2008-08-29 12:58:16

Hmm i dont know how to do arial we might not have it so you may ned tocreate bmp masks

shouldnt be 2 difficult

bold italic arial size 17-18 i think

Hugolord

2008-08-29 13:17:53

From: Waddo
Hmm i dont know how to do arial we might not have it so you may ned tocreate bmp masks

shouldnt be 2 difficult

bold italic arial size 17-18 i think


Well I can make the bmp masks with no problem my problem is actually the rest lol

Hugolord

2008-08-30 08:49:45

anyone?

Nava2

2008-08-30 12:02:02

Check out naumans tut.

Hugolord

2008-08-30 15:22:31

Yeah I have, he doesn't explain quite fully how to do it for custom text. :S

nielsie95

2008-08-30 18:19:19

You don't need custom font:


#question {
position:absolute;
left:44px;
top:18px;
color:#efebe7;
font:bold 22px arial,sans-serif;
font-style:italic;

}

That's from the css.

Hugolord

2008-08-30 18:27:06

From: nielsie95
You don't need custom font:


#question {
position:absolute;
left:44px;
top:18px;
color:#efebe7;
font:bold 22px arial,sans-serif;
font-style:italic;

}

That's from the css.

and what can I do with that.. -,-?

Daniel

2008-08-31 00:34:09

From: Hugolord
and what can I do with that.. -,-?

It tells you that the size of the font is 22, it's bold-italic and has the colour of #EFEBE7. ;)

Hugolord

2008-08-31 05:39:56

Yeah But I don't know the text.. like if it's "Hello" or "blablabla"

Naum

2008-08-31 08:26:30

Ok Now

1. Make BitmapMasks for every char, e,g abc e.t.c
2. Use LoadChars2, make sure the masks on on desktop or folder
3. Use GetTextAtEx
4. E.g Usage (say your font was 'stuff');

Trim(GetTextAtEx(x , y , 0, Stuff, False, False, 0,
1, 0, 80, False, tr_AllChars));

5. Set it up, I say maybe use FindText before calling it.

mastaraymond

2008-08-31 08:42:46

Ehm

"LoadCharsFromFont2" anyone?

Hugolord

2008-09-06 10:26:03

Ok, I took some of it from different posts and Scar's manual.

I'm trying to read the letter "H" from notepad.


But it's not working..

any help?
program FindText;
{.include SRL/SRL.scar}

var
x,y,
c :Integer;

begin
SetupSRL;
ActivateClient;
c := LoadCharsFromFont2('Arial', 22, False, False, False, False);
GetTextAtEx(13, 9, 150, c, True, False, 0, 1, 0, 22, False, tr_AlphaNumericChars);

if IsTextInAreaEx(0, 0,60, 59,x,y,'H',130, c,True,False,0,1,0) then


WriteLn('Text Found! :)')
else
WriteLn('Text not found :(');
FreeChars2(c);
end.

Hugolord

2008-09-21 10:51:50

Bump?

I'm sure Devs know how to get this working I just need a lil push and since no one on my msn seems to be able to help me..

BUMP