Results 1 to 2 of 2

Thread: Array help

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Array help

    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?

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    bump

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •