Results 1 to 8 of 8

Thread: GetTextAtEx please.

  1. #1
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default GetTextAtEx please.

    I've been trying to get it working but I've never used it before :S
    Can anyone show me an example of it that actually works? You'd be !

    I've read the SRL manual but I just need an example ^^.
    Ce ne sont que des gueux


  2. #2
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    this should teach you
    if it doesn't pm me (on msn, AIM, or IM)

    SCAR Code:
    {*******************************************************************************
    function GetChatBoxText(Line, TextCol: Integer): string;
    By: ZephyrsFury
    Description: Gets text on the line Line with colour TextCol. (Line 1 is the top,
      Line 8 is the bottom line).
    Colours:
      clMessage/clBlack - Black text messages ("Oh Dear you are dead", etc).
      clChat/clBlue     - Chat messages from you and other players.
      clTrade/clPurple  - Colour of trade request text.
      clFriend          - Colour of friend and clan chat.
      Works with other colours too.
    *******************************************************************************}

    function GetChatBoxText(Line, TextCol: Integer): string;
    var
      P: TPoint;
      cArr: TPointArray;
      B: TBox;
    begin
      P := TextCoords(Line);
      if (FindColorsTolerance(cArr, TextCol, MCX1, P.y, MCX2, P.y + 13, 0)) then
      begin
        B := GetTPABounds(cArr);
        Result := Trim(GetTextAtEx(B.x1 - 1, B.y1 - 2, 0, SmallChars, False, False,
          0, 1, TextCol, 80, False, tr_AllChars));
      end;
    end;

  3. #3
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    To as the (x, y) coords you pick the top-x and top-y ones.
    Ce ne sont que des gueux


  4. #4
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    so you understand?

  5. #5
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    *just woke up*
    Yes! I do
    Thanks mate

    +repped you
    Ce ne sont que des gueux


  6. #6
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Sure, np, btw i just copy/pasted from an srl include

  7. #7
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Yeah but you took time to find it for me and that's enough ;3
    Ce ne sont que des gueux


  8. #8
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    yeah... but i did this:
    SCAR Code:
    function HelpOutOnForums : boolean;
    begin
    tooLong := 60000;
    readPosts;
    z := getSystemTime;
    While not(find) do
    begin
    lookInIncludes;
    If getSystemTime - z > toolong then BREAK;
    end;
    Result := find;
    end;

    it just so happened that i did it in less then 1 min

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
  •