Kyle Undefined
2011-11-12 11:11:14
Ok, so I've been trying to get this to work for awhile now. Here is the screen that I'm trying to get the text off of.

I have the detection for this screen done and working. I've tried getting the text for the "Hit ___" text, but no matter what chars I use, I can't seem to get the text. The same goes with the "Score" total to the right. I have the right colors and I'm setting the box around the correct areas. I just don't know what to do or try now.
I'm using this script to test, I change the values around after each run and try again, but I haven't gotten lucky so far :(
I've also tried this approach, but it errors out…
This is the error I get: "Error: Exception: Access violation at line 125"
Any ideas?

I have the detection for this screen done and working. I've tried getting the text for the "Hit ___" text, but no matter what chars I use, I can't seem to get the text. The same goes with the "Score" total to the right. I have the right colors and I'm setting the box around the correct areas. I just don't know what to do or try now.
I'm using this script to test, I change the values around after each run and try again, but I haven't gotten lucky so far :(
program new;
{$i srl/srl.scar}
var
charArr : TStringArray;
I, x, y : Integer;
begin
setupsrl;
charArr := [BigChars, CharsNPC, CharsTrade, FriendChars, LoginChars, SmallChars, StatChars, UpChars, XPChars];
for I := 0 to High(charArr) do
begin
if GetTextAt(410, 190, 0, 3, 4, 10092288, 0, 20, charArr[I]) <> '' then
WriteLn('Found text with char ' + charArr[I] + ', text is ' + GetTextAt(410, 190, 0, 3, 4, 10092288, 0, 20, charArr[I]));
end;
end.I've also tried this approach, but it errors out…
program new;
{$i srl/srl.scar}
var
charArr, txtArr : TStringArray;
I, II, x, y : Integer;
begin
setupsrl;
charArr := [BigChars, CharsNPC, CharsTrade, FriendChars, LoginChars, SmallChars, StatChars, UpChars, XPChars];
txtArr := ['Black', 'Blue', 'Red', 'Yellow', 'Bulls-Eye'];
for I := 0 to High(charArr) do
begin
for II := 0 to High(txtArr) do
begin
if FindText(x, y, txtArr[II], charArr[I], MSX1, MSY1, MSX2, MSY2) then
begin
WriteLn('Found text with char ' + charArr[I] + ', text found is ' + txtArr[II]);
Break;
end;
end;
end;
end.
This is the error I get: "Error: Exception: Access violation at line 125"
function CreateBitmapMaskFromText(txt,chars : string) : integer;
begin
result := BitmapFromText(txt,chars); <-------------- Line 125 in simba.simba
end;
Any ideas?