Results 1 to 2 of 2

Thread: Reading text in wordpad

  1. #1
    Join Date
    Aug 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Reading text in wordpad

    SCAR Code:
    program New;
    var c : integer;
    var strings : string;

    begin
    repeat
    c := LoadCharsFromFont2('Courier New', 10, False, False, False, False);

    strings := GetTextAtEx(16, 10, 0, c, False, False, 0, 0, -1, 20, True, tr_NormalChars)

    writeln(strings);

    until isfkeydown(4);
    end.

    This is the code I have so far, and It should read text in wordpad which is the font courier new, size 10 etc and then writeln it into the debug box

    but it doesn't do this: are my coordinates incorrect or is it something else? Thanks.

  2. #2
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I changed it to TR_AllChars and it worked.
    And it also might be because the x and y have to be the exact right point.
    So i made this to find the exact point where it will read it.
    SCAR Code:
    program New;

    var
      c, x, y: integer;
      strings : string;


    begin
      repeat
        c := LoadCharsFromFont2('Courier New', 10, False, False, False, False);
        getmousepos(x,y);
        strings := GetTextAtEx(x, y, 0, c, False, False, 0, 0, -1, 20, True, tr_AllChars)
        writeln(strings);
      until isfkeydown(4);
    end.
    That just searches from where your mouse is.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Grabbing or reading Text from a game text box
    By British in forum OSR Help
    Replies: 16
    Last Post: 02-27-2009, 08:02 AM
  2. Text Reading
    By noobmaster in forum OSR Help
    Replies: 7
    Last Post: 05-26-2008, 02:05 PM
  3. Reading Text
    By jeremywilms in forum OSR Help
    Replies: 11
    Last Post: 04-30-2007, 12:02 PM
  4. Reading Text
    By Ransom in forum OSR Help
    Replies: 5
    Last Post: 11-17-2006, 04:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •