Results 1 to 4 of 4

Thread: recognise numbers?

  1. #1
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default recognise numbers?

    Hey guys, I have a simple question. What function would you use to recognise a number from Tbox on my rs3 screen and return it as a result into my script?

  2. #2
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

  3. #3
    Join Date
    Feb 2012
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    84 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    tesseract or fonts... but show a picture please
    I'd need it to recognise this collon at GE screen
    Capture.PNG

  4. #4
    Join Date
    Mar 2013
    Location
    Freedomville.
    Posts
    155
    Mentioned
    2 Post(s)
    Quoted
    107 Post(s)

    Default

    Quote Originally Posted by Nufineek View Post
    I'd need it to recognise this collon at GE screen
    Capture.PNG
    Using tesseract, something like:

    Simba Code:
    function GEPrice(Bounds: TBox): String;
    begin
      result := tesseractGetText(Bounds.x1,Bounds.y1,Bounds.x2,Bounds.y2,5,5,false,0,'')
    end;

    Change the scaling parameters as required. Or you can dynamically grab bounds by search for colours and returning TPA bounds.

    EDIT: Realised you want just numbers.

    try
    Simba Code:
    function GEPrice(Bounds: TBox): Integer;
    var
      Text: String;
    begin
      Text := tesseractGetText(Bounds.x1,Bounds.y1,Bounds.x2,Bounds.y2,5,5,false,0,'');
      result := StrToIntDef(ExtractFromStr(Text, Numbers), 0);
    end;

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
  •