Results 1 to 8 of 8

Thread: Help with grabbing text please :)

  1. #1
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default Help with grabbing text please :)

    Hello,
    I'm trying to grab the text my main in trade screen but its not working

    Can anyone help please?

    Thx

    Code:
    username := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 2070783, 53, 'CharsTrade07');
    writeln('Username: '+IntToStr(username));
    Also when is CTRL + left click GetTextAtExWrap nothing pops up... ? :O

  2. #2
    Join Date
    Sep 2012
    Posts
    71
    Mentioned
    2 Post(s)
    Quoted
    26 Post(s)

    Default

    Do you change the colour tolerance speed at any stage because I think this sometimes causes text finding functions to break.

    Also in you writeln the "inttostr(username)" I would have thought should just be "tostr(username)" because the username will be a string and intostr will give a type mismatch. Correct me if I'm wrong though

  3. #3
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    Did you look in the font files? CharsTrade07 are unfinished.
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  4. #4
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by Pavement View Post
    Do you change the colour tolerance speed at any stage because I think this sometimes causes text finding functions to break.

    Also in you writeln the "inttostr(username)" I would have thought should just be "tostr(username)" because the username will be a string and intostr will give a type mismatch. Correct me if I'm wrong though
    Close, :P

    username := GetTextAtExWrap(35, 8, 150, 21, 0, 5, 1, 2070783, 53, 'UpChars07');
    writeln('Username: '+String(username));

    Was the correct one

    Anyways the GetTextAtExWrap wont seem to open... I cant see what those numbers are....Lol, can some1 tell me please? :P

  5. #5
    Join Date
    Sep 2012
    Posts
    71
    Mentioned
    2 Post(s)
    Quoted
    26 Post(s)

    Default

    You mean this?

    function GetTextAtExWrap(const xs,ys,xe,ye, minvspacing, maxvspacing, hspacing,color, tol: integer;const font: string): string;

  6. #6
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by Pavement View Post
    You mean this?

    function GetTextAtExWrap(const xs,ys,xe,ye, minvspacing, maxvspacing, hspacing,color, tol: integer;const font: string): string;
    Yep, thanks!



    I tried a sample with the HighScore loader ive found in the search part but its throwing errors (Loading name correctly!)

    Error:

    Username: <the name :P>
    Overall: Verdana (wtf??)
    Attack: html{margin: 0; padding: 0; height: 100%; overflow: hidden;}#content{position:absolute; left: 0; right: 0; bottom: 0; top: 0px;}</style><div id="content"><iframe width="100%" height="100%" frameborder="0" src="https://hiscore.runescape.com/error404.ws"></iframe></div>
    <div style="font-weight: bold; color: #666666; font-size: large">404 - Page not found</div><hr width="300" align="left" /><p>Sorry
    Error: Out Of Range at line 3029
    The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 3, 4, 5, 6, 7, 8]


    Code used:

    username := GetTextAtExWrap(102,29,176,57, 0, 1, 1, 2070753, 53, 'UpChars07');
    writeln('Username: '+String(username));


    skillArr := ['Overall', 'Attack', 'Defence', 'Strength', 'Constitution', 'Ranged', 'Prayer', 'Magic'];

    stats := parse();
    for i := 0 to high(stats) do
    begin
    if i mod 2 <> 0 then
    begin
    setArrayLength(actualStats, length(actualStats)+1);
    actualStats[length(actualStats)-1] := stats[i];
    end;
    end;


    for i := 0 to high(skillArr) do
    writeLn(skillArr[i]+': '+actualStats[i]);

    Function used:

    function Parse(): tStringArray;
    var
    page: string;
    begin
    page := GetPage('http://hiscore.runescape.com/index_lite.ws?player='+username);
    result := explode(',', page);
    end;

    Edit: Fixed it, forgot it had rs3 highscores.... Changed to 07 now getting this:

    Username: <the name :P>
    Overall: Verdana
    Attack: the page you were looking for was not found.</p><!--Padding for IEPadding Padding for IEPadding Padding for IEPadding Padding for IEPadding for IEPadding for IEPadding for IEPadding for IEPadding for IEPadding for IEPadding for IEPadding for IEPadding for IE--></body></html>

    Error: Out Of Range at line 3030
    The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 3, 4, 5, 6, 7, 8]

  7. #7
    Join Date
    Sep 2012
    Posts
    71
    Mentioned
    2 Post(s)
    Quoted
    26 Post(s)

    Default

    I'm not sure what you are trying to do now but some things to note with high-scores is that if you grab the username from in game then make sure spaces become '_' (dashes).

    This is the link for oldschool highscores:
    http://services.runescape.com/m=hisc...r=USERNAMEHERE

    And what I mentioned above about the 'tostr(username)' is incorrect because you can just leave it as:
    Simba Code:
    writeln('Username: '+username);

    This should work because username will already be a string.

    Edit: TY Baws. Funny side story here. Well while trying to grab a screenshot of a trade screen to help test this for you I traded some random guy (GuyX) 5k. GuyX took it ofcourse, I got my screenshot and GuyX asked for more. Another guy(GuyZ) nearby suddenly complained about how GuyX was begging after i gave GuyX stuff. Long story short GuyZ traded me 1.5m and said I deserved it. Ty baws wouldnt have got it without you :P

    Edit2: I also can't get gettextatexwrap(); to work either :L

  8. #8
    Join Date
    Aug 2014
    Posts
    93
    Mentioned
    2 Post(s)
    Quoted
    36 Post(s)

    Default

    Quote Originally Posted by Pavement View Post
    I'm not sure what you are trying to do now but some things to note with high-scores is that if you grab the username from in game then make sure spaces become '_' (dashes).

    This is the link for oldschool highscores:
    http://services.runescape.com/m=hisc...r=USERNAMEHERE

    And what I mentioned above about the 'tostr(username)' is incorrect because you can just leave it as:
    Simba Code:
    writeln('Username: '+username);

    This should work because username will already be a string.

    Edit: TY Baws. Funny side story here. Well while trying to grab a screenshot of a trade screen to help test this for you I traded some random guy (GuyX) 5k. GuyX took it ofcourse, I got my screenshot and GuyX asked for more. Another guy(GuyZ) nearby suddenly complained about how GuyX was begging after i gave GuyX stuff. Long story short GuyZ traded me 1.5m and said I deserved it. Ty baws wouldnt have got it without you :P

    Edit2: I also can't get gettextatexwrap(); to work either :L
    Thx gonna try that ^^

    Also 1.5m free is always a ftw xD

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
  •