So I'm not sure what the problem here is.... pretty much what this script it supposed to do is go to each line of chat, look for the blue text and the red text. with that text it then scrolls through to see if that text matches what it is supposed to be looking for. When it is done it then moves on to the next line. The script does not seem to even output how long it took like it's supposed to:
Simba Code:
{$I SRL-OSR/SRL.Simba}
procedure GetText;
var
i, j, k, l, t, n, c:Integer;
ChatText,chatlook:TStringArray;
Colors:TIntegerArray;
begin
SetLength(Colors,2)
SetLength(ChatText,1)
Colors := [16711680,128]
chatlook := ['Hey','Hello','Good','Hi']
marktime(t)
for k := 0 to 8 do
begin
while j<2 do
begin
ChatText[n] := GetChatBoxText(i,Colors[j]);
for l := 0 to high(chatlook) do
begin
if c>high(chatlook) then exit;
if ToStr(ChatText) = chatlook[c] then
begin
Writeln('Found text you were look for, doing action')
exit;
end;
c := c+1;
end;
j := j+1
end;
j:=0
i := i+1
end;
Writeln('Took ' + tostr(t/1000000) + ' ms')
Writeln('Text found ' + tostr(ChatText))
end;
begin
GetText;
end.
Any ideas?