SRL Archive - OSR Help

Problems getting some text.


Floor66

2011-04-03 06:21:29

I've tried every single fucking font :fiery: Aswell as using GetTextATPA.

Also, GetTextAtEx results in a param error EVENTHOUGH I've filled them all out according to the ctrl+space thingy and Simba docs.

Pic is attached. Please make this work before I kill my laptop.

Sabzi

2011-04-03 06:33:46

I was having the same problem with GetTextAtEx.
It's redefined in srl so look it up there.
EDIT: Or is it not? I am trying to find it with no luck :p.

EDIT2: This must be it: (in simba.scar)

function GetTextAtEx(x, y: Integer; Tolerance: Integer; Chars: String; CheckShadow, CheckOutline: Boolean; MinSpacing, MaxSpacing: Integer; TextColor: Integer; TextLength: Integer; Strict: Boolean; Range: TCharRange): anystring;
begin
// no hspacing, defaulting to 4. (with 4 ' and : will work)
// Defaulting MaxSpacing to 3
if TextColor = -1 then
raiseexception(ercustomerror,'GetTextAtEx with color = -1, is not supported');
Maxspacing := 3;
{$ifdef SimbaDebug}
Writeln([x, y, minSpacing, maxSpacing, 4, textcolor, tolerance, textlength, Chars]);
{$endif}
Result := GetTextAt(x, y, minSpacing, maxSpacing, 4, textcolor, tolerance, textlength, Chars);
{$ifdef SimbaDebug}
Writeln('GetTextAt result: ' + Result);
{$endif}
if Range = tr_Digits then
result := GetNumbers(result);
end;

Floor66

2011-04-03 08:27:56

Got it to work :D

Yago

2011-04-03 15:11:10

sometimes text fails (statschar)… It somehow can't find the cooking text in the main chat

Wizzup?

2011-04-07 15:19:40

From: Floor66
Got it to work :D


Can we see the code? Might help someone out in the future.

Floor66

2011-04-08 10:29:41

Sure, no problem:

GetTextAtEx(455, 45, 8, StatChars, True, True, 0, 4, 26316, 4, False, tr_Digits);

is what I ended up using after going through several different tries with different settings.