Results 1 to 5 of 5

Thread: Searching for Text...

  1. #1
    Join Date
    Jun 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Searching for Text...

    Hi People,
    I'm back with a new script and a new question.
    This script is not for runescape it is for a game called shimlar @ shimlar.org
    When banking the Button i want, "Deposit All' but the buttons change places.
    So i need to search for text within a box.
    I found IsTextInAreaEx
    but it sounds like overkill is there an easy way to find the string "Deposit All"
    within a box, and then save its position as x,y?

  2. #2
    Join Date
    Jun 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Or should i learn DTMs because they are helpful in teh long run...

  3. #3
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    dont double post and that function is simple
    function IsTextInAreaEx(x1, y1, x2, y2: Integer; var x, y: Integer; S: string; Tolerance: Integer; Chars: Integer; CheckShadow, CheckOutline: Boolean; MinSpacing, MaxSpacing: Integer; TextColor: Integer): Boolean;

    x1,y1,x2,y2 is the whole area in coordinates that u search.
    the function gives x and y so you can use them later.
    S is the text to search for.
    Tolerance is ... tolerance.
    Chars is the "font" that it uses.
    CheckShadow is more for RS so set that false.
    id also set the next thing false.
    Min/Max Spacing is how much minimum or maximum space there could be between the text, i know for RS you set it to 0,0 i would do that here too.
    text color is the color of the text your searching for, u can set to -1 for any color.

  4. #4
    Join Date
    Jun 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if IsTextInAreaEx(455,113,537,167,x,y,'Deposit All',1,arial,false,false,0,0,-1);
    the font is arial what do i put
    Line 64: [Error] (64:55): Unknown identifier 'arial' in script

  5. #5
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    you have to set arial as a variable
    function LoadCharsFromFont2(fontname: string; fontsize: Integer; fontbold, fontitalic, fontunderline, fontstrike: Boolean): Integer

    just put
    SCAR Code:
    arial:= LoadCharsFromFont2(arial, 10,false, false, false, false);
    decalre arial as a variable somewhere
    you may have to experiment with the second number because its font size and i dont know what the font size 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. Replies: 0
    Last Post: 08-25-2008, 01:00 PM
  3. Searching a file
    By Bobzilla69 in forum Java Help and Tutorials
    Replies: 0
    Last Post: 05-03-2008, 09:10 AM
  4. Replies: 6
    Last Post: 03-22-2007, 12:30 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
  •