OCR text identifing in scar?

Discussion in 'Scar/Simba Help' started by shadowpwner, Aug 9, 2007.

OCR text identifing in scar?
  1. Unread #1 - Aug 9, 2007 at 11:34 PM
  2. shadowpwner
    Referrals:
    0

    shadowpwner Guest

    OCR text identifing in scar?

    how would I go upon using scar to search for the font on a webpage , and return what it typed in plain text on the debug window?

    suppose the page had Hello World in time new roman, but it was an image. How would i go about using SCAR to identify what the text says and show it in the debug window?

    HTML:
    program FontTest;
    const
    
      fontname      = 'Tahoma';
      size          = 16;
      bold          = false;
      italic        = false;
      underline     = false;
      strikethrough = false;
    var
      font, bitmap, sizex, sizey: integer;
    begin
      //Load the font into memory
      font := LoadCharsFromFont2(fontname, size, bold, italic, underline, strikethrough);
     
      //Generate a bitmap mask from the previously loaded font
      bitmap := CreateBitmapMaskFromText('Hello', font);
     end.
     
    This is the code so far I made, how do I identify the text on a website?
     
  3. Unread #2 - Aug 10, 2007 at 9:30 AM
  4. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    OCR text identifing in scar?

    GetPage('');

    Will return everything on that page has a string. You can use Between(''); to shrink it down to what yoy want.
     
  5. Unread #3 - Aug 10, 2007 at 2:39 PM
  6. shadowpwner
    Referrals:
    0

    shadowpwner Guest

    OCR text identifing in scar?

    thanks, however GetPage only returns HTTP webpage contents as string. However, the text i want to find is in an image.
     
  7. Unread #4 - Aug 10, 2007 at 2:56 PM
  8. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    OCR text identifing in scar?

    Code:
    SafeCopyCanvas(GetClientCanvas, GetBitmapCanvas(Bitmap), 0, 0, 0, 0, 0, 0, 0, 0);
     
  9. Unread #5 - Aug 10, 2007 at 6:20 PM
  10. shadowpwner
    Referrals:
    0

    shadowpwner Guest

    OCR text identifing in scar?

    thanks, but as me being a scar noob, im not sure how to implement this on to my existing script.

    Would I have to make a a bitmap of each letter to make

    SafeCopyCanvas(GetClientCanvas, GetBitmapCanvas(Bitmap), 0, 0, 0, 0, 0, 0, 0, 0);

    work?

    ohyeah, if I didn't mention this, the Hello World image changes words every time I goto that webpage. Like sometime it will say hello world, sometime hi, etc.
     
  11. Unread #6 - Aug 10, 2007 at 6:44 PM
  12. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    OCR text identifing in scar?

    No, set the coordinates of where to pick the picture off the canvas and then the coordinates to copy that onto the bitmap.

    You will have to make a bitmap of each phrase and then compare the two bitmaps to see if they are the same. So. . . Make them into an array and then use For etc Do etc if (etc = etc) then break; etc.
     
< New runescape Interface | scar 2.03 and SRL 3.6 doesn't exist? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site