Been trying for some time to read this text, can anyone help me?
I tried with different coords, but I never quite understood the function.
Been trying for some time to read this text, can anyone help me?
I tried with different coords, but I never quite understood the function.
Here:
http://www.villavu.com/forum/showthread.php?t=31983, Make sure it finds the color of it (put a find color before the text grab), because it needs exact co-ords.
In the post, silly..
must have loaded it just as i put the link in (I had to get it from my signature)
Read it through and ended up with this:
SCAR Code:function Opponent: String;
var
x, y, Color, Mode: Integer;
begin
Color := 39423;
Mode := 0;
FindColor(x, y, Color, 45, 37, 105, 55);
Result := GetTextAtEx(x - Mode, y - Mode, 10, StatChars, False, False, 0, 10, Color, 25, False, tr_AllChars);
end;
That was for the Rating text.
changed the var Mode from -5 to 5 but it never found the text..
What am I doing wrong?
Noes, someone else is making a FoG script.
And thanks Nauman for the link.
are you sure the color of the text is the same?
are you sure that the off put is the same?
~shut
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
I picked the color and it's static.
Just ran this:
SCAR Code:function Opponent: String;
var
x, y, Color: Integer;
begin
Color := 39423;
for x := 45 to 65 do
for y := 35 to 45 do
Writeln(GetTextAtEx(x, y, 50, StatChars, False, False, 0, 5, Color, 6, False, tr_AllChars));
end;
Put it outputs this:
Is should find the text 'Rating' but it doesn't.Code:: : : i : i i: I: i: I:Ir: I:::i i i : : : i : i i: I: i: I:Ir: I:::i i i : : : i : i i: I: i: I:Ir: I:::i i i : : : i : i i: I: i: I:Ir: I:::i i i : : : i : i i: I: i: I:Ir: I:::i i i : : : i : i i: I: i: I:Ir:: I:::i: i i : : : i : i i: I: i: I:Ir:: I:::i: i i : : : i : i i: I: i: I:Ir:: I:::i: i i : : : i : i i: I: i: I:Ir:: I:::i: i i : : : i : i i: I: i: I:Ir:: I:::i: i i : : : i : i i: I: i: I:Ir:: I:::i: i i : : : : i i: : i: Ir:: :::i: i i : : : : i i: : i: :Ir:: :::i: i i : : : : i i: : i: :Ir:: :::i:: i i : : : : i i: i: I :Ir:: :::i:: i i : : : : i i: i: I :Ir:: :::i:: i i : : : : i i: i: I :Ir:: :::i:: i i : : : : i i: i: I :Ir:: :::i:: i i : : : : i i: i: I :Ir:: :::i:: i i : : :: : i i: i i: I Ir:: I : i:: i i : : :: : i i: i i: I Ir:: I : i:: i i
If you are trying to find the opponents name, the colour is 6976375.
I'm having the same troubles, its returning a blank.
Think I figured out, it's SmallChars. It finds the whole text except a 'i'. Perhaps the 'i' in the Char folder is broken?
Richard: It was the orange test with 'Rating'. Tested on that since I didn't have to enter all the time to search for that
This can be closed as I have solved it. This is what I ended up with if anyone is curious (Richard)
SCAR Code:function Return(S: String): Variant;
begin
case Lowercase(S) of
'rating': Result := StrToIntDef(GetNumbers(GetTextAtEx(96, 40, 50, SmallChars, False, False, 0, 5, OrColor, 6, False, tr_AllChars)), 0)
'charged': Result := StrToIntDef(GetNumbers(GetTextAtEx(350, 42, 50, SmallChars, False, False, 0, 5, BeigeColor, 6, False, tr_AllChars)), 0);
'hunting': Result := (pos('ng:', GetTextAtEx(350, 47, 50, SmallChars, False, False, 0, 5, BeigeColor, 6, False, tr_AllChars)) > 0);
'opponent': Result := Trim(GetTextAtEx(393, 47, 10, SmallChars, False, False, 0, 5, NameColor, 50, False, tr_AllChars));
end;
end;
Last edited by Frt; 06-22-2009 at 01:27 AM.
Sometimes you have to play with the max spacing and the min spacing values to find the text, it happens to me a lot![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)