Results 1 to 13 of 13

Thread: Get Text from a spot.

  1. #1
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Smile Get Text from a spot.

    Hello guys i would need a function what would get this specific Name and put it into a string.

    Here is Pic..
    I'm not very goot at getting text, i have tried.. But with zero results..

    I can lend an account. And this is in Fist Of Guthix.

    And if it is possible to do that in reflection then why not






    Thanks.


    ~Home
    Last edited by Home; 12-20-2010 at 09:04 PM.

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well that font looks like the friends chat font ( I think ). If you do a little digging, Wizzup had a function in his Essence Miner v2 that grabbed text on the mainscreen and returned the co-ords (to find Aubury). Now I would suggest taking a look at this function, changing the font set, and then changing the search area and you should have your answer.

    if you try and fail with that, I'll take a look into it.

  3. #3
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Unhappy

    I failed.. :/ Darn it.
    I couldn't get it work. Sorry mate. : /


    ~Home

  4. #4
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    That could easily be done in reflection, you just need to find the right interface that contains that information.

  5. #5
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    That could easily be done in reflection, you just need to find the right interface that contains that information.
    Hmm. How, is there tuorial or something : /


    I can lend an account if you are good with Ref.


    ~Home

  6. #6
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    go on IRC and I'll try to get it working via color.

    Edit: Completed. I only had the picture you gave me, so you need to get the actual rs co-ordinates and put them in Area. The only thing is that the text detection is still somewhat off, it didn't quite get the name right, but it was close. I think if you need specifics you should use reflection, or else work on perfecting the system I used.

    SCAR Code:
    const
      Text_Color = 6976375;

    function GetPlayerName(Area: TBox; TextCol: Integer): string;
    var
      TPA: TPointArray;
      B: TBox;
    begin
      FindColorsTolerance(TPA, TextCol, Area.x1, Area.y1, Area.x2, Area.y2, 3);
      if Length(TPA) = -1 then
        Exit;
      B := GetTPABounds(TPA);
      Result := Trim(GetTextAtExWrap(B.x1-1,B.y1,B.x2+1,B.y2,0,5,2,TextCol,0,FriendChars));
    end;
    Last edited by Blumblebee; 12-20-2010 at 10:27 PM.

  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    go on IRC and I'll try to get it working via color.

    Edit: Completed. I only had the picture you gave me, so you need to get the actual rs co-ordinates and put them in Area. The only thing is that the text detection is still somewhat off, it didn't quite get the name right, but it was close. I think if you need specifics you should use reflection, or else work on perfecting the system I used.

    SCAR Code:
    const
      Text_Color = 6976375;

    function GetPlayerName(Area: TBox; TextCol: Integer): string;
    var
      TPA: TPointArray;
      B: TBox;
    begin
      FindColorsTolerance(TPA, TextCol, Area.x1, Area.y1, Area.x2, Area.y2, 3);
      if Length(TPA) = -1 then
        Exit;
      B := GetTPABounds(TPA);
      Result := Trim(GetTextAtExWrap(B.x1-1,B.y1,B.x2+1,B.y2,0,5,2,TextCol,0,FriendChars));
    end;
    Thanks matey!
    I'm working on Both ones

    Thanks again

    ~Home

  8. #8
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Just use the interface explorer with rsbot

  9. #9
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Are those really FriendChars? I thought they would be the same as XPChars

  10. #10
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    Are those really FriendChars? I thought they would be the same as XPChars
    FriendChars definitely worked for me. I recognized them because Nike used them to paint stats for one of his scripts if I recall

  11. #11
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    FriendChars definitely worked for me. I recognized them because Nike used them to paint stats for one of his scripts if I recall
    Hm maybe XPChars are the same as FriendChars then...

  12. #12
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    Hm maybe XPChars are the same as FriendChars then...
    does xp chars have the shadow? I don't really even know where the xpchars are :/

  13. #13
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    does xp chars have the shadow? I don't really even know where the xpchars are :/
    XPChars are the characters from the numbers and XP when you open the XB Bar on the left side of the minimap.

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
  •